$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
ComboBox Data Binding with ArrayList in ASP.NET
Home > How to > ComboBox Data Binding ArrayList
The ComboBox Control from our UI SDK for ASP.NET AJAX allows users to bind combobox to different types of data sources, like array, array list, DataSource and xml data file. And this online tutorial page will show you how to bind data from array and array list to the combobox at runtime in aspx web application.
One thing that needs to be mentioned here is that although the data source can support both hierarchical and flat structure, the asp.net ComboBox Control is only available with these non-hierarchical data source since combobox items can not have child items.
Following code is the declaration of the web ComboBox objecs.
<kettic:PerComboBox runat="server" ID="PerComboBox1">

To successfully bind data from array or arraylist to asp.net combobox, you have to create the Array and ArrayList in the Page_Load event handler. And after you set the DataSource property, you must call the DataBind method for binding created Array and Arraylist to target combobox objects.

How to Bind ComboBox to Array using DataBinding

In this section, we will show you how to get data from Array and bind it to target web ComboBox object with sample C# code.
string[] array = { "1", "2", "3" };
PerComboBox1.DataSource = array;
The image below is attached t show the result of this combobox data binding to Array application.

How to Bind ComboBox to ArrayList using DataBinding

With the asp.net ComboBox Control, it is also easy to bind data from ArrayList to source combobox object using C# code.
ArrayList arrayList = new ArrayList();

PerComboBox1.DataSource = arrayList;
Similar, we also attach an image to display the result of this combobox data bind to ArrayList project.

Other Related ComboBox Data Binding Tutorials

Apart from the function to bind data from Array or ArratList to combobox, the asp.net ComboBox Control also allows developers to bind combobox to other data types, like: