How to enable a linkbutton server control using javascript?

Posted by satyaj on Stack Overflow See other posts from Stack Overflow or by satyaj
Published on 2009-11-16T10:41:30Z Indexed on 2010/05/14 21:04 UTC
Read the original article Hit count: 182

Filed under:
|

I have a linkbutton server control in my page whose Enabled attribute is initially set to "false". When a text box's text changes I would like to enable the linkbutton. I tried the following but it does not work. Could you let me know if i am missing something.

function TextBox_TextChanged()
{
    var control = $get("<%= linkButtonSave.ClientID%>");
    if(control != null)
        control.enabled = true;
}

Thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about ASP.NET