Tuesday, October 2, 2012

ASP.NET Call Javascript from code behind

ASP.NET : Call Javascript from code behind.

This very easy demo will show you how to call or run JavaScript from code behind.
You can use ScriptManager or ClientScriptManager to run this.
Demo Code show below.

ASP.NET : Call or run Javascript from code behind

Source code below this text

        ClientScript.RegisterStartupScript(Page.GetType(), "testScript", "alert('First Script');alert('Second Script');", true);

        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", "alert('ThirdScript');", true);

Don't hesitate to contact me zomdev.

No comments:

Post a Comment