In this tutorial you will learn how to disable the asp:Textbox using javascript. I will show you how to do so in just one and simple line of javascript code. Let's have a look over it.
disable the asp:Textbox using javascript
function DisableTextBox()
{
document.getElementById("<%=txtName.ClientID %>").disabled="disabled";
}
Using the OnClientClick event of asp:button i am calling the javascript function to disable the asp:textbox . So this is the way to disable the asp:textbox using javascript.
0 comments:
Post a Comment