- Online Barcode Generator
- How To
- Buy Now
KT.UI for ASP.NET DropDownList offers full support for binding to all ASP.NET 2.0 DataSource components in server side, such as SqlDataSource, EntityDataSource, and XmlDataSource. This page is arranged into two sections to set DropDownList server side data binding:
Brief Introduction of DropDownList Server Side Data Binding Control
To bind to a DataSource component of KT.UI for ASP.NET AJAXJ DropDownList library, users are supposed to set the DataSourceID property of PerDropDownList to the ID of the DataSource component. In addition to this, users also need to set these PerDropDownList properties: DataTextField and DataValueField to map the Text and Value properties of the items to the respective columns or fields from the data source.
By using KT.UI ASP.NET DropDownList control, users can refer to and apply the ItemDataBound event, if you need to set and map the additional columns from the data source to properties of PerDropDownList items.
The event arguments passed to the event, e.Item and e.Item.DataItem, which include the example of PerDropDownList item being bound and the DataItem to which it is bound. Users can map a property from the DataItem to the corresponding property of PerDropDownList item. Please convert the DataItem object to the proper data type at first.
Sample ASP.NET Codes for Server Side Data Binding
We have mentioned that DropDownList control for ASP.NET supports these three DataSource components in server side: SqlDataSource, EntityDataSource, and XmlDataSource. In this section, we will discuss how to set each of the three datasource component within ASP.NET Web project.
How to Set Server Side SqlDataSource
Complete ASP.NET codes below are offered to set SqlDataSource control in server side within DropDownList ASP.NET application.
How to Set Server Side XmlDataSource
Sample ASP.NET codes below are offered to set XmlDataSource component in server side within DropDownList ASP.NET application.
How to Set Server Side EntityDataSource
Sample ASP.NET codes below are offered to set EntityDataSource component in server side within DropDownList ASP.NET application.
ASP.NET AJAX UI Controls