asp:TextBox ReadOnly=true or Enabled=false? asp:TextBox ReadOnly=true or Enabled=false? asp.net asp.net

asp:TextBox ReadOnly=true or Enabled=false?


If a control is disabled it cannot be edited and its content is excluded when the form is submitted.

If a control is readonly it cannot be edited, but its content (if any) is still included with the submission.


Another behaviour is that readonly = 'true' controls will fire events like click, buton Enabled = False controls will not.


Readonly will not "grayout" the textbox and will still submit the value on a postback.