SqldataSource with a dropdownlist

M

mostafa hamdy

Hello all
I have some dropdownlist and I use sqldatasource to fill it , and it's work correctly , but I want to add empty item to the dropdownlist , but I dont know how to do that , please if any body get what I mean and can help me please send me
Regards
Mostafa
 
L

Looch

Hello all
I have some dropdownlist and I use sqldatasource to fill it , and it's work correctly , but I want to add empty item to the dropdownlist , but I dont know how to do that , please if any body get what I mean and can help me please send me
Regards
Mostafa

MyDropDownList.Items.Insert(0, "");

The arguments are the index to insert the item at (zero) and a set of
double quotes to represent a blank item.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top