Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Q: dropdown list, no selected value

Reply
Thread Tools

Q: dropdown list, no selected value

 
 
=?Utf-8?B?SklNLkgu?=
Guest
Posts: n/a
 
      04-12-2005
I am populating dropdown list with binding dataset, and dropdown list shows
first item by default when application is launched, is there any way I can
set it be empty and let user select one?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?S29zdGFkaW4gS29zdG92?=
Guest
Posts: n/a
 
      04-12-2005
Call this in Page_Load(or some other handler):
ListItem li = new ListItem("-1", "");
myDDL.Items.InsertAt(0, li);

Regards,
Kostadin Kostov

"JIM.H." wrote:

> I am populating dropdown list with binding dataset, and dropdown list shows
> first item by default when application is launched, is there any way I can
> set it be empty and let user select one?

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      04-12-2005
You have a choice of adding an empty row to either ddl itself or to the
bound dataset.

Eliyahu

"JIM.H." <> wrote in message
news:879FE8E1-A875-4A8E-B138-...
> I am populating dropdown list with binding dataset, and dropdown list

shows
> first item by default when application is launched, is there any way I can
> set it be empty and let user select one?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu ASP .Net 1 03-25-2006 01:24 PM
Get selected value of dropdown from panel Andy Sutorius ASP .Net 1 02-24-2005 10:27 AM
Get selected value of dropdown from panel Andy Sutorius ASP .Net 1 02-24-2005 05:37 AM
Re: need selected value from dropdown list box Scott Allen ASP .Net 1 08-25-2004 07:09 PM
asp.net dropdown selected value =?Utf-8?B?dG1laXN0ZXI=?= ASP .Net 2 06-17-2004 01:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57