Setting a hidden field programatically

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SimonH

    Setting a hidden field programatically

    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]

    #2
    Re: Setting a hidden field programatically

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

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

    "SimonH" <none@hotmail.c om> wrote in message
    news:5426063243 6441219062500@n ews.microsoft.c om...[color=blue]
    > 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
    >[/color]

    Comment

    • William F. Robertson, Jr.

      #3
      Re: Setting a hidden field programatically

      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" <none@hotmail.c om> wrote in message
      news:5426063243 6441219062500@n ews.microsoft.c om...[color=blue]
      > 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
      >[/color]


      Comment

      Working...