Several DropDownList Controls SelectedItem Problem

Discussion in 'ASP .Net Web Controls' started by Ivan, Nov 24, 2003.

  1. Ivan

    Ivan Guest

    Hi,
    I have a problem with a page which has about 50 web controls , 12 of the are
    DropDownList.
    Also, I have a "Continue" button, and on the server code an event sub
    btnContinue_Click, where I process the input data.
    There is a code like :

    Dim MyVariable As Integer
    Dim AnOtherVariable As Integer
    MyVariable = DropDownList1.SelectedItem.Value
    AnOtherVariable = DropDownList2.SelectedItem.Value


    The Problem is that the value of both MyVariable and AnOtherVariable are 1
    (the value of the first option)

    Can anyone help?
     
    Ivan, Nov 24, 2003
    #1
    1. Advertising

  2. Are they databound using the page bindings to the same column?


    "Ivan" <> wrote in message
    news:...
    > Hi,
    > I have a problem with a page which has about 50 web controls , 12 of the

    are
    > DropDownList.
    > Also, I have a "Continue" button, and on the server code an event sub
    > btnContinue_Click, where I process the input data.
    > There is a code like :
    >
    > Dim MyVariable As Integer
    > Dim AnOtherVariable As Integer
    > MyVariable = DropDownList1.SelectedItem.Value
    > AnOtherVariable = DropDownList2.SelectedItem.Value
    >
    >
    > The Problem is that the value of both MyVariable and AnOtherVariable are

    1
    > (the value of the first option)
    >
    > Can anyone help?
    >
    >
    >
     
    Alan Corbett \(.NET MVP\), Nov 25, 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. Antonio D'Ottavio
    Replies:
    1
    Views:
    2,748
    Antonio D'Ottavio
    Sep 19, 2005
  2. Marina
    Replies:
    0
    Views:
    1,206
    Marina
    Jun 25, 2003
  3. Jos Branders
    Replies:
    6
    Views:
    13,112
    William F. Robertson, Jr.
    Jun 25, 2003
  4. Ivan
    Replies:
    4
    Views:
    8,261
  5. Antonio D'Ottavio
    Replies:
    1
    Views:
    218
    Antonio D'Ottavio
    Sep 19, 2005
Loading...

Share This Page