0
Answer

Howto insert first row in dropdown list before databind()

Brett Brown

Brett Brown

20y
1.8k
1
Want to be able to have the first value in a dropdown list display "(select one)". I am doing this currently before my databind: ListItem li = new ListItem(); li.Value = ""; li.Text = "(select one)"; dropdownlist.Items.Add(li); When the databind is called: dropdownlist.databind(); My first row is overwritten or lost. How could I keep "(select one)" and still do a databind? brett