Is there anyway to get the previous selected item in a drop down list

Discussion in 'ASP .Net Web Controls' started by KJ, Jul 30, 2004.

  1. KJ

    KJ Guest

    Is there anyway to get the previous selected item in a drop down list
    when you change the selection?
     
    KJ, Jul 30, 2004
    #1
    1. Advertising

  2. KJ

    Juno Guest

    Hi,


    If you want to get previous selected item, you can save the current selected
    value in viewstate.
    When postback, the current selected item becomes previouse item, and you can
    get it from viewstate.

    --
    Juno
    MCSD.NET, MCDBA, MCSE
    ----------------------------------------------------------
    Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
    DataForm.NET - The most powerful data entry web server control for ASP.NET



    "KJ" <> wrote in message
    news:...
    > Is there anyway to get the previous selected item in a drop down list
    > when you change the selection?
     
    Juno, Jul 30, 2004
    #2
    1. Advertising

  3. KJ

    KJ Guest

    This works if you dynamically add days to your drop-down, but if you
    have 1, 2, and 3 in your drop-down and change it from 3 to 1 on
    postback the selected item is 1 not 3. So you will be saving the
    selected value 1 in viewstate




    > Hi,
    >
    >
    > If you want to get previous selected item, you can save the current selected
    > value in viewstate.
    > When postback, the current selected item becomes previouse item, and you can
    > get it from viewstate.
    >
    > --
    > Juno
    > MCSD.NET, MCDBA, MCSE
    > ----------------------------------------------------------
    > Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
    > DataForm.NET - The most powerful data entry web server control for ASP.NET
    >
    >
    >
    > "KJ" <> wrote in message
    > news:...
    > > Is there anyway to get the previous selected item in a drop down list
    > > when you change the selection?
     
    KJ, Aug 2, 2004
    #3
    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. Marina
    Replies:
    6
    Views:
    13,621
    KROSS
    Jan 21, 2008
  2. =?Utf-8?B?TWVyZGFhZA==?=

    Drop down list does not see the selected item!

    =?Utf-8?B?TWVyZGFhZA==?=, Oct 20, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    11,912
    =?Utf-8?B?TWVyZGFhZA==?=
    Oct 20, 2004
  3. Stephen Adam
    Replies:
    3
    Views:
    12,165
    Stephen Adam
    Nov 30, 2004
  4. weiwei
    Replies:
    0
    Views:
    1,052
    weiwei
    Jan 5, 2007
  5. Replies:
    0
    Views:
    192
Loading...

Share This Page