HOW CALL A JAVA SCRIPT FUNCTION INSIDE A C# CODE OF ASP.NET


HOW CALL  A  JAVA SCRIPT FUNCTION INSIDE A C# CODE OF  ASP.NET

For calling javascript function inside C# code or sever side use this

1. RegisterClientScriptBlock:-Adds Script to the top of the page
2.RegisterClientScriptInclude:- Refer to a external .js file
3.RegisterStartupScript:- script is registered before onload event of a page
4. RegisterOnSubmitStatement:- Script is registered on onSubmit event of page

ClientScript.RegisterClientScriptBlock(GetType(), "sas", "", true)



Or  for calling a function
ClientScript.RegisterClientScriptBlock(GetType(), "sas", "function()”,true)



Comments