ASP.NET 2.0 ReadOnly behavior change when EnableViewState is false

Posted by: Rick Strahls WebLog, on 20 Dec 2005 | View original | Bookmarked: 0 time(s)

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
Category: Data | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2588 | Hits: 133

Similar Posts

  • ASP.NET Membership Tip: Requiring New Users To Change Their Password When Logging On For The First Time more
  • "Variable is assigned but its Value is never used" Warning more
  • Thread Safety Via Read Only Collections more
  • Writing meaningful, self-documenting, behavior-oriented tests more
  • The Java Posse on Agile more
  • The Java Posse on Agile more
  • Big sites, big modules, big problems? Easy solution! more
  • jQuery CSS Property Monitoring Plug-in updated more
  • Mike Volodarsky posts a Breaking Change list in IIS 7 more
  • OnClientClick Breaks Validation more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | 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