asp:TextBox ReadOnly=true or Enabled=false?

Alf picture Alf · Oct 6, 2008 · Viewed 138.8k times · Source

What's the difference between the Enabled and the ReadOnly-properties of an asp:TextBox control?

Answer

Adam Bellaire picture Adam Bellaire · Oct 6, 2008

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.