Asp.Net 2.0 - Textbox previous value

Asp.Net 2.0 - Textbox previous value

am 09.01.2008 22:07:02 von Steve

How do I get the previous value of a text box ? Is there a way to access
the TextBox control state ?

Thanks for any direction,
Steve

Re: Asp.Net 2.0 - Textbox previous value

am 10.01.2008 00:57:23 von mark

"Steve" wrote in message
news:0929C6C6-FFD8-4EE2-B6A6-30E713A637AB@microsoft.com...

> How do I get the previous value of a text box ? Is there a way to access
> the TextBox control state ?

There are some clever tricks you can do with ViewState, but by far the
simplest (and 100% guaranteed) method is to include a hidden field
containing the initial value of the textbox and then compare the two at
postback:





--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Re: Asp.Net 2.0 - Textbox previous value

am 10.01.2008 06:07:46 von Hal Rosser

"Steve" wrote in message
news:0929C6C6-FFD8-4EE2-B6A6-30E713A637AB@microsoft.com...
> How do I get the previous value of a text box ? Is there a way to access
> the TextBox control state ?
>
> Thanks for any direction,
> Steve

This video talks some about postback
http://msdn2.microsoft.com/en-us/beginner/bb308809.aspx