TextBox ReadOnly in ASP.NET v2.0

Posted by: Jotekes Blog, on 13 Apr 2006 | View original | Bookmarked: 0 time(s)

If TextBox's ReadOnly property is "true", postback data won't be loaded e.g it essentially means TextBox being readonly from server-side standpoint (client-side changes will be ignored). If you want TB to be readonly in the "old manner" use TextBox1.Attributes.Add("readonly","readonly") as that won't affect server-side functionality.

This is documented here:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.readonly.aspx

And someone pointed that out as bug a while ago:
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=60bb1325-9dc3-48e9-a32f-e211ea345862

Even though it's not even about EnableViewState but only about server-side ReadOnly property affecting postback data loading...

Category: Data | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 5753 | Hits: 245

Similar Posts

  • Behaviors vs Subclassing in Silverlight more
  • Customizing ASP.NET's CreateUserWizard Control To Display a Fixed Set of Security Questions more
  • Reporting Release History : Q1 2009 SP1 (version 3.0.9.430) more
  • Top 5 New Features in SQL Server 2008 Reporting Services more
  • The DefaultButton Property - News To Me! more
  • RedirectButton - Redirect Users With the Click of a Button more
  • Debugging Dependency Properties in WPF: Part 3 more
  • Redirecting with the Click of a Button more
  • Updates to the TextBox Word / Character Counter Control more
  • Putting more than one behavior on one element 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