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. Advertisements

  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. Advertisements

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,918
    Antonio D'Ottavio
    Sep 19, 2005
  2. Jos Branders
    Replies:
    6
    Views:
    13,363
    William F. Robertson, Jr.
    Jun 25, 2003
  3. huobazi
    Replies:
    0
    Views:
    723
    huobazi
    Jul 1, 2003
  4. Ivan
    Replies:
    4
    Views:
    8,396
  5. VB Programmer
    Replies:
    5
    Views:
    8,677
    maysam
    Mar 11, 2008
  6. Julius Fenata
    Replies:
    6
    Views:
    17,285
    David Jessee
    Jan 17, 2005
  7. sling blade
    Replies:
    3
    Views:
    2,912
    Burak SARICA
    Feb 28, 2005
  8. Antonio D'Ottavio
    Replies:
    1
    Views:
    376
    Antonio D'Ottavio
    Sep 19, 2005
Loading...