Bookmark and Share

Tuesday, November 13, 2007

DropDownList binding to List

Here is the simplest way to bind an asp.net DropDownList to List<string>:

List
<string> list = new List<string>();
list.Add(
"AAA");
list.Add(
"BBB");
mydrop.DataSource = list;
myAnno.DataBind();
 
 
 

No comments:

Post a Comment