0
Reply

Howto insert first row in dropdown list before databind()

Brett Brown

Brett Brown

Mar 29 2004 4:35 PM
1.7k
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