Thursday, 11 April 2013

HOW TO CALL A JAVASCRIPT FUNCTION FROM SERVERSIDE IN ASP.NET

There are mainly two ways for calling the javascript function from server side:-

FIRST ONE IS:-

System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "Javascript_Function();", true);

SECOND ONE IS:- 

 System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "document.getElementById('" + button1.ClientID + "').style.display='none';", true); 

 

No comments:

Post a Comment