Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
This is Samar,Beggning my career in asp.net and this is my first post.

*I have task to show information in html text box,I had set the html textbox property disabled on page onload as below.

<input type="text" id="txtinfo" disables="disabled"

*Now I need to show information as data saved by setting html textbox property as enabled in aspx.cs file

Can any one help me how can I enable the property in aspx.cs file


Thanks,
SAMAR
Posted

1 solution

Just Add an Attribute runat="server"

ASP.NET
<input type="text" id="txtinfo" runat="server" />


in the code behind you can do like this.
C#
txtinfo.Disabled = true; // disable the textbox
txtinfo.Disabled = false; // enable the textbox
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900