- Back to Home »
- Bind Controller Properties to DropDownlist
Posted by : my solutions
Monday, December 17, 2012
How to Bind Properties to One Dropdown
For Example do you want to Bind the Chart Types to one Drop Down Menu
The following Code Demonstrated for Bind the system type properties to one DropDown or any ListBox
protected override void OnLoad(EventArgs e)
{
//load the Graph Models
#region
base.OnLoad(e);
if (!IsPostBack)
{
DDLModels.DataSource = Enum.GetNames(typeof(SeriesChartType));
DDLModels.DataBind();
}
DataBind();
#endregion
}
-----------------------------------