re: Sorting a DropDownList using ArrayList
http://www.nullskull.com/faq/763/sorting-a-dropdownlist-using-arraylist.aspx
This is an excellent article. Thank you!
I am trying to figure out how to call the following sub in ASP.Net (VB) in Visual Studio 2010
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
sub1(DropDownList1)
'Value of type 'System.Web.UI.WebControls.DropDownList' cannot be converted to 'WebApplication1.DropDownList'
End Sub
Public Shared Sub sub1(ByVal ddlControl As DropDownList)
Dim objListItem As ListItem = New ListItem("a".ToString(), "b".ToString())
ddlControl.Items.Add(objListItem)
'Argument not specified for parameter 'value' of 'Public Sub Add(key As Object, value As Object)'.
End Sub
Can someone please help?