Setting a hidden field programatically

Discussion in 'ASP .Net Web Controls' started by SimonH, Feb 10, 2005.

  1. SimonH

    SimonH Guest

    Hi all,

    When a form loads, I need to store the original value along with the form
    so I can check if the value submitted back has been changed.

    I was wondering what the best way to do this would be?

    Can I use the viewstate for this or is there a preffered solution?

    Many thanks all

    Simon
    SimonH, Feb 10, 2005
    #1
    1. Advertising

  2. Viewstate would be fine or a hidden server-side field.

    Unless the amount of data is huge, it shouldn't make much difference.

    "SimonH" <> wrote in message
    news:...
    > Hi all,
    >
    > When a form loads, I need to store the original value along with the form
    > so I can check if the value submitted back has been changed.
    >
    > I was wondering what the best way to do this would be?
    >
    > Can I use the viewstate for this or is there a preffered solution?
    >
    > Many thanks all
    >
    > Simon
    >
    Ken Cox [Microsoft MVP], Feb 10, 2005
    #2
    1. Advertising

  3. If the value you are checking is a list control or a text box, you could
    wire to the "changed" event. This event will run before any button clicks.

    bill

    "SimonH" <> wrote in message
    news:...
    > Hi all,
    >
    > When a form loads, I need to store the original value along with the form
    > so I can check if the value submitted back has been changed.
    >
    > I was wondering what the best way to do this would be?
    >
    > Can I use the viewstate for this or is there a preffered solution?
    >
    > Many thanks all
    >
    > Simon
    >
    William F. Robertson, Jr., Feb 10, 2005
    #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. SimonH
    Replies:
    2
    Views:
    380
    William F. Robertson, Jr.
    Feb 10, 2005
  2. =?Utf-8?B?UGF1bA==?=
    Replies:
    14
    Views:
    1,134
    Juan T. Llibre
    May 13, 2005
  3. Rick
    Replies:
    3
    Views:
    8,139
    Alexey Smirnov
    Apr 13, 2010
  4. GavMc
    Replies:
    4
    Views:
    322
    Evertjan.
    Sep 22, 2005
  5. Roy Adams

    writing from hidden field to text field

    Roy Adams, Dec 20, 2004, in forum: Javascript
    Replies:
    1
    Views:
    190
Loading...

Share This Page