| Subject: |
ASP.NET 2.0 Beta 2 Possible Gotcha! |
| Updated: |
Oct-1-2005 |
| Rating: |
Not Rated |
| By: |
Rocky Moore - Member #: 1 |
| Location: |
Klamath Falls, Oregon USA |
| Website: |
www.RockyMoore.com |
| Category: |
Computers > Programming > .NET > ASP.NET |
I recently convered over a ASP.NET 1.1/C# project to ASP.NET V2.0 beta2 in Visual Studio .NET 2005 beta 2.
There were many changes required to say the least. One that I was not aware of and did not notice until further testings, was a change they made to ASP.NET viewstate and textbox controls.
In the prior version of ASP.NET, textbox controls will retain their values in viewstate even though they are marked read-only. No longer! If you flag a textbox (and possible other controls) as read-only, it will not save the values in viewstate and you MUST manually set those values on each page load. It took me a little while to figure out why some of my forms were not holder their data during a postback. Glad it turned out something I could easily fix!
[Submit DIGG for this tip]
-----------
Note: Use the tips posted on this site at your own risk.
The tips are posted by the public and as such may or may not be valid.