differring option and value in ddlb

Discussion in 'ASP .Net Web Controls' started by Mark, Oct 30, 2003.

  1. Mark

    Mark Guest

    I populate a drop down list box from a database, and then
    insert a block value at the top (to represent "all
    values"), using a ddlb.Items.Insert(0,"");
    This sets both the value and the text to "". How can I
    set them to different values? I need something
    (conceptually, I know this overrload doesnt exist) along
    the lines of ddlb.Items.Insert(0,"",All).
    Thanks, Mark
     
    Mark, Oct 30, 2003
    #1
    1. Advertising

  2. Mark

    HD Guest

    Mark,
    After adding the item try this
    ddList.items[0].text = "abc";
    ddList.items[0].value = "xyz";

    regards,

    HD
    "Mark" <> wrote in message
    news:44a901c39f01$897f7080$...
    > I populate a drop down list box from a database, and then
    > insert a block value at the top (to represent "all
    > values"), using a ddlb.Items.Insert(0,"");
    > This sets both the value and the text to "". How can I
    > set them to different values? I need something
    > (conceptually, I know this overrload doesnt exist) along
    > the lines of ddlb.Items.Insert(0,"",All).
    > Thanks, Mark
     
    HD, Oct 30, 2003
    #2
    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. Julien ROUZIERES

    g++ -pg option and -shared option

    Julien ROUZIERES, Dec 21, 2004, in forum: C++
    Replies:
    1
    Views:
    724
    GianGuz
    Dec 21, 2004
  2. =?Utf-8?B?TWFya0F1cml0?=

    ddlb clearing

    =?Utf-8?B?TWFya0F1cml0?=, Jun 22, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    370
    =?Utf-8?B?TWFya0F1cml0?=
    Jun 22, 2006
  3. Cas
    Replies:
    5
    Views:
    793
    Kevin Jones
    Aug 28, 2006
  4. =?Utf-8?B?U2FuZHBvaW50R3V5?=

    specifying datavaluefield in ddlb

    =?Utf-8?B?U2FuZHBvaW50R3V5?=, Sep 27, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    353
    =?Utf-8?B?U2FuZHBvaW50R3V5?=
    Sep 27, 2007
  5. How to Fill DDLB with 3000+ data .??

    , Jan 22, 2008, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    139
    PJ on Development
    Jan 23, 2008
Loading...

Share This Page