To insert “Select” at first in the drop down list use the code after the databind option in dropdown list.
ddlusername.DataSource = ds;
ddlusername.DataTextField = "UserName";
ddlusername.DataValueField = "UserID";
ddlusername.DataBind();
ddlusername.Items.Insert(0, "--Select--");
Thursday, September 3, 2009
Insert "Select" in DropDown List
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment