Hi, I populate a dropdownlist from a database table, but I need to give the user an option to NOT select anything from the dropdownlist, the problem is that the dropdownlist does not have a BLANK item as an option, and I don't want to add a blank record to
the table that popuates the dropdownlist as a result, because the list is sorted alphabetically, the first items automatically dispplays on the dropdownlist and I pick it up when I look at SelectedItem.Text for the control. How can I solve this problem? Thanks
U can insert a emply item in the dropdown list using your code. You donot have to add a blank record in the database Mydropdownlist.DataSource = MyDataReader Mydropdownlist.DataBind() Mydropdownlist.Items.Insert(0, New ListItem("", "")) hope that this solve
your problem
gsilva
Member
150 Points
30 Posts
DropDownList Question
Nov 17, 2003 02:35 AM|LINK
sazizrahman
Member
154 Points
30 Posts
Re: DropDownList Question
Nov 17, 2003 02:49 AM|LINK
http://www.dotnetpanda.com