ASP.NET 2.0 ReadOnly behavior change when EnableViewState is false

Posted by: Rick Strahls WebLog, on 20 Dec 2005 | View original

Here’s a behavior difference between ASP.NET 1.1 and 2.0: If you have a control on a page that is marked Read-Only and EnableViewState is set to false on the Page, the ReadOnly value will no longer post back in ASP.NET 2.0 - the value gets lost. This even though the value is actually returned in the POST buffer. I do this a bunch in some of my applications where there are generated IDs that display on a form, but they are readonly. The value displays and is supposed to be part of the postback...

Advertisement
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.

Similar Posts

  • Blogging from Tech Ed 2006 - Stefan Shakow on ASP.NET - level 400 more
  • Blogging from Tech Ed 2006 - Stefan Shakow on ASP.NET - level 400 more
  • The Java Posse on Agile more
  • Avoid IISRESET in ASP.NET applications (added bonus: ASPRESET) more
  • Failure to start monitoring changes / Unable to start debugging on the web server more
  • Failure to start monitoring changes / Unable to start debugging on the web server more
  • ASP.NET 2.0 Web Parts Portal - Part 1 - The Basics more
  • Interesting bug in Saxon.NET/Mono/OSX usage more
  • Wondering where the latest build is more
  • Moving ASP.NET Apps from IIS 5.x to 6.0 more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD