Saturday, 25 August 2012

Beginning .Net : make the TextBox disabled in ASP .NET

You can make textbox disabled. Means do not allow enter or change text into textbox.
You can do this with the help of "Enabled" property. You need to set Enabled=false to make text box disabled.
By default text box is enabled.

Here is example for this.
In this example we have one text box and we make that textbox disabled.
You can set this property from aspx side or from Coding side.

ASPX Code:
<asp:TextBox runat="server" ID="txtProductTitle" Text="Keyboard" Enabled="false" ></asp:TextBox>

Output : 




This is very useful articles for Beginning .Net .

This type of C# Tips is very useful in day to day programming life.

Note : Give Us your valuable feedback in comments. Give your suggestions in this article so we can update our articles accordingly that.



No comments:

Post a Comment