System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "document.getElementById('" + button2.ClientID + "').style.display='none';", true); |
Seconda way you can call javascript function also
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "MyJavascriptFunction();", true); |
Like this we can call the javascript functions or buttons in codebehind without assigning it to any control
No comments:
Post a Comment