How to bind an ArrayList to a DropDownList

Platform: ASP.NET| Category: Collections and Lists

VB.NET


Dim arrList As ArrayList = New ArrayList
arrList.Add('Faq')
arrList.Add('Tips')
arrList.Add('Tricks')
DropDownList1.DataSource = arrList
DropDownList1.DataBind()

C#


ArrayList arrList    = new ArrayList();
arrList.Add('Faq');
arrList.Add('Tips');
arrList.Add('Tricks');
DropDownList1.DataSource = arrList;
DropDownList1.DataBind();

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.