Thursday, 20 March 2014

How to register script in asp.net

Add the Javascript\Jquery script into the client side in asp.net having the four ways.

RegisterClientScriptBlock :  It add script block on top of the page. You can create the script as a string, and pass it to the method on page script. You can use this method to insert any script into the page.

http://www.getmscode.com/2014/03/how-to-use-registerclientscriptblock-in.html

RegisterClientScriptInclude : It is similar to RegisterClientScriptBlock. but adds a script block that references an external .js file.


 RegisterStartupScript : It add  script block into the page, which executes once the page finishes loading but before Onload event raise of page onload. The script is not created as an event handler or function.

http://www.getmscode.com/2014/03/how-registerstartupscript-works-in.html

  RegisterOnSubmitStatement : It add the script that executes in response to the page's onsubmit event.

No comments:

Post a Comment

Others

You will like to read it