"choose one" in a dropdownlist

Discussion in 'ASP .Net' started by Cirene, Jun 4, 2008.

  1. Cirene

    Cirene Guest

    I have a databound drop down list. What is the easiest way to put the 1st
    item as "choose one"?

    Thanks.
    Cirene, Jun 4, 2008
    #1
    1. Advertising

  2. Cirene

    Geek Guest

    On Jun 4, 4:47 pm, "Cirene" <> 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.
    Geek, Jun 4, 2008
    #2
    1. Advertising

  3. <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" <> wrote in message
    news:...
    >I have a databound drop down list. What is the easiest way to put the 1st
    >item as "choose one"?
    >
    > Thanks.
    >
    Eliyahu Goldin, Jun 4, 2008
    #3
  4. Cirene

    Cirene Guest

    thanks everyone !

    all great advice!

    "xzzy" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >>I have a databound drop down list. What is the easiest way to put the 1st
    >>item as "choose one"?
    >>
    >> Thanks.
    >>

    >
    >
    Cirene, Jun 4, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johan
    Replies:
    15
    Views:
    862
    Johan
    Feb 27, 2004
  2. Replies:
    0
    Views:
    276
  3. Replies:
    0
    Views:
    360
  4. Replies:
    0
    Views:
    262
  5. NotGiven
    Replies:
    6
    Views:
    131
    oeyvind toft
    Sep 5, 2004
Loading...

Share This Page