Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > "choose one" in a dropdownlist

Reply
Thread Tools

"choose one" in a dropdownlist

 
 
Cirene
Guest
Posts: n/a
 
      06-04-2008
I have a databound drop down list. What is the easiest way to put the 1st
item as "choose one"?

Thanks.


 
Reply With Quote
 
 
 
 
Geek
Guest
Posts: n/a
 
      06-04-2008
On Jun 4, 4:47*pm, "Cirene" <(E-Mail Removed)> wrote:
> I have a databound drop down list. *What is the easiest way to put the 1st
> item as "choose one"?
>
> Thanks.


if u did not complete it yet.set the selectedindex property to the 1.
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      06-04-2008
<asp:dropdownlist ... AppendDataBoundItems="true" ..>
<asp:ListItem Text="choose one" Value="-1" />
</asp:dropdownlist>

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Cirene" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a databound drop down list. What is the easiest way to put the 1st
>item as "choose one"?
>
> Thanks.
>



 
Reply With Quote
 
Cirene
Guest
Posts: n/a
 
      06-04-2008
thanks everyone !

all great advice!

"xzzy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed). ..
> another possibility is in sql server, something like
>
> select field01, field02 from tablename union '<< Chose One>>' as aa, -1 as
> bb from tablename
>
> and then .bind in codebehind etc.
>
> John Bickmore
> www.MyReader.net
> "Cirene" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I have a databound drop down list. What is the easiest way to put the 1st
>>item as "choose one"?
>>
>> Thanks.
>>

>
>



 
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
DropDownList inside GridView: How to set SelectedIndex for the DropDownList? keithb ASP .Net 1 11-01-2006 05:24 AM
GridView: Filter DropDownList for another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-29-2005 07:44 AM
GridView: Filtr DropDownList from another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-23-2005 01:31 PM
databinding a Dropdownlist to another dropdownlist tshad ASP .Net 8 10-19-2005 10:00 PM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM



Advertisments