ASP.NET TextBox ReadOnlyProperty
TextBox Control
Definition and Usage
The ReadOnly property is used to set or return whether the text in the TextBox control can be changed.
If this property is set to TRUE, the text cannot be changed; otherwise it is FALSE. The default is FALSE.
Syntax
<asp:TextBox ReadOnly="TRUE|FALSE" runat="server"/>
Example
The following example sets the ReadOnly property to "TRUE":
<form runat="server">
<asp:TextBox id="tb1" runat="server" ReadOnly="TRUE"
Text="This text is read only" />
</form>
<asp:TextBox id="tb1" runat="server" ReadOnly="TRUE"
Text="This text is read only" />
</form>
Try it Yourself »
TextBox Control Other Extensions