28 Sept 2011

VB.NET: Programmatically populate a DropDownList (aspx)

If you need to populate a dropdownlist by hand

However the value and the displayed text are both the same!

Me.ddlTest.Items.Clear()
Dim strDDL() As String = {"Aaa111", "Bbb222", "Ccc333"}
Me.ddlTest.DataSource = strDDL
Me.ddlTest.DataBind()

No comments:

Post a Comment