dropdown needs blank

T

tshad

I have a dropdown in my aspx page that keeps putting a 0 in the text.

It is:
<asp:Listitem value="0"> </asp:Listitem>

I tried putting &nbsp; there and it still displays 0 in the 1st item.

How do I get it to display a blank?

Thanks,

Tom
 
Joined
Mar 4, 2009
Messages
17
Reaction score
0
HI, Your question is not clear. Could you please expalin a bit more.
If you want to blank the existing first item then you can write:
DropDownList1.Items[0].Text = "";
If you want to add a new item in 0 index then you can write:
dropDownList.Items.Insert(0, new ListItem());

REGARDS
shawpnendu.blogspot.com
 

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

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top