I use this JS function in ASP.net:
function habilitado(){
var b = document.getElementById('<%= Label4.ClientID %>').value = "Habilitado";
}
I call it that in codebehind. The label value should be changed, but this does not happen. Can anyone help?
Note: I have already tried $(document).ready(function()
at the beginning, and it still does not work.
ClientScript.RegisterClientScriptBlock(this.GetType(), "teste", "<script language=\"javascript\">habilitado();</script>");
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "teste", "<script type='text/javascript'>habilitado();</script>", true);