adding an option to an asp:DropDownList

liunx

Guest
i have an asp:DropDownList which get its data like this :

cmdSelect = New SqlCommand("Select * From course_type", conPubs)

course_type.DataSource = cmdSelect.ExecuteReader()
course_type.DataValueField = "course_id"
course_type.DataTextField = "course_name"
course_type.DataBind()

how can i add in the first option of the select box my own option before the ones that are added using the databind?
thnaks in advance
pelegMan this problem is hitting a lot of folks today. Anyway, just toss this in.


ddlName.Items.Insert(0, "-- Select Some Stuff --")
 
Back
Top