ASP.NET Webforms has two ways of disabling text input fields: Method 1: Disabled
|
<asp:TextBox runat="server" ID="CommentsTextBox" Text='<%#Bind("Comments") %>' CssClass="textEntryLargest" TextMode="MultiLine" Rows="4" Enabled="False" /> |
Method 2: ReadOnly
|
<asp:TextBox runat="server" ID="CommentsTextBox" Text='<%#Bind("Comments") %>' CssClass="textEntryLargest" TextMode="MultiLine" Rows="4" Enabled="True" ReadOnly="True" /> |
The first method greys out the field by default, the second one does not grey out. The other difference I have found is that the second method leaves the scroll bar in memo fields enabled, as opposed […]
Recent Comments