get the value of dropdownList

Discussion in 'ASP .Net Web Controls' started by Wen Ou, Jun 21, 2005.

  1. Wen Ou

    Wen Ou Guest

    hi

    i got a problem about dropdownlist. i set autopostback true. when its index
    changed, i would like to get its value before changed and compare with the
    value after changed. i don't have any idear about that.

    anyone can help me

    thank you

    wen ou
    Wen Ou, Jun 21, 2005
    #1
    1. Advertising

  2. Create a new control and inherit from the dropdownlist. Add a property for
    the previous value.

    When the dropdownlist is filled with items, set the previos value to null.
    All other times, just put the current value into the previous value AFTER you
    read the contents of the previous value.

    Make sure the value is persisted in state.
    --
    Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group

    Future Business Model - National City Mortgage


    "Wen Ou" wrote:

    > hi
    >
    > i got a problem about dropdownlist. i set autopostback true. when its index
    > changed, i would like to get its value before changed and compare with the
    > value after changed. i don't have any idear about that.
    >
    > anyone can help me
    >
    > thank you
    >
    > wen ou
    >
    >
    Michael Baltic, Jun 29, 2005
    #2
    1. Advertising

  3. Wen Ou

    Wen Ou Guest

    Hi Michael
    thank you for your respondance
    i still don't understand your answer. could you give me more details please

    thank you
    wen ou

    "Michael Baltic" wrote:

    > Create a new control and inherit from the dropdownlist. Add a property for
    > the previous value.
    >
    > When the dropdownlist is filled with items, set the previos value to null.
    > All other times, just put the current value into the previous value AFTER you
    > read the contents of the previous value.
    >
    > Make sure the value is persisted in state.
    > --
    > Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
    >
    > Future Business Model - National City Mortgage
    >
    >
    > "Wen Ou" wrote:
    >
    > > hi
    > >
    > > i got a problem about dropdownlist. i set autopostback true. when its index
    > > changed, i would like to get its value before changed and compare with the
    > > value after changed. i don't have any idear about that.
    > >
    > > anyone can help me
    > >
    > > thank you
    > >
    > > wen ou
    > >
    > >
    Wen Ou, Jun 29, 2005
    #3
  4. Do you know how to create an inherited control? If not, I can give you some
    sample code.

    My email user id is Michael.Baltic the domain is NCMC.com (That should stop
    an automated spammer?)

    If you don't want to create an inherited control, you can use session
    variables to save the value. Each time you read the current value, save it
    to the previous value (after you read the contents of the previous value)
    --
    Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group

    Future Business Model - National City Mortgage


    "Wen Ou" wrote:

    > Hi Michael
    > thank you for your respondance
    > i still don't understand your answer. could you give me more details please
    >
    > thank you
    > wen ou
    >
    > "Michael Baltic" wrote:
    >
    > > Create a new control and inherit from the dropdownlist. Add a property for
    > > the previous value.
    > >
    > > When the dropdownlist is filled with items, set the previos value to null.
    > > All other times, just put the current value into the previous value AFTER you
    > > read the contents of the previous value.
    > >
    > > Make sure the value is persisted in state.
    > > --
    > > Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
    > >
    > > Future Business Model - National City Mortgage
    > >
    > >
    > > "Wen Ou" wrote:
    > >
    > > > hi
    > > >
    > > > i got a problem about dropdownlist. i set autopostback true. when its index
    > > > changed, i would like to get its value before changed and compare with the
    > > > value after changed. i don't have any idear about that.
    > > >
    > > > anyone can help me
    > > >
    > > > thank you
    > > >
    > > > wen ou
    > > >
    > > >
    Michael Baltic, Jun 30, 2005
    #4
  5. Wen Ou

    Wen Ou Guest

    i don't like to use session variable. could you give some sample code of
    inherited control please

    thank you

    wen ou

    "Michael Baltic" wrote:

    > Do you know how to create an inherited control? If not, I can give you some
    > sample code.
    >
    > My email user id is Michael.Baltic the domain is NCMC.com (That should stop
    > an automated spammer?)
    >
    > If you don't want to create an inherited control, you can use session
    > variables to save the value. Each time you read the current value, save it
    > to the previous value (after you read the contents of the previous value)
    > --
    > Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
    >
    > Future Business Model - National City Mortgage
    >
    >
    > "Wen Ou" wrote:
    >
    > > Hi Michael
    > > thank you for your respondance
    > > i still don't understand your answer. could you give me more details please
    > >
    > > thank you
    > > wen ou
    > >
    > > "Michael Baltic" wrote:
    > >
    > > > Create a new control and inherit from the dropdownlist. Add a property for
    > > > the previous value.
    > > >
    > > > When the dropdownlist is filled with items, set the previos value to null.
    > > > All other times, just put the current value into the previous value AFTER you
    > > > read the contents of the previous value.
    > > >
    > > > Make sure the value is persisted in state.
    > > > --
    > > > Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
    > > >
    > > > Future Business Model - National City Mortgage
    > > >
    > > >
    > > > "Wen Ou" wrote:
    > > >
    > > > > hi
    > > > >
    > > > > i got a problem about dropdownlist. i set autopostback true. when its index
    > > > > changed, i would like to get its value before changed and compare with the
    > > > > value after changed. i don't have any idear about that.
    > > > >
    > > > > anyone can help me
    > > > >
    > > > > thank you
    > > > >
    > > > > wen ou
    > > > >
    > > > >
    Wen Ou, Jun 30, 2005
    #5
    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. Micheal
    Replies:
    1
    Views:
    827
    Joe Bleaux
    Jul 30, 2003
  2. Piotr Strycharz
    Replies:
    7
    Views:
    9,517
    Kevin Spencer
    Sep 30, 2003
  3. S.Y.C
    Replies:
    0
    Views:
    439
    S.Y.C
    Oct 17, 2003
  4. Thierry
    Replies:
    3
    Views:
    106,630
    Corleone
    Feb 15, 2010
  5. Replies:
    1
    Views:
    655
Loading...

Share This Page