Thursday, 20 March 2014

How to register script in

Add the Javascript\Jquery script into the client side in 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.

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.

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

No comments:

Post a Comment