August 22, 2012 by Nitesh

How to add a piece of Javascript just before the end of Form Tag in ASP.Net

In ASP.Net, we often require to add some piece of Javascript from Code-behind that should get added towards the end of <form> tag and not in the header of the form. For this, we need to use RegisterStartupScript function. The syntax to use the function is as below:

"alert('Hey! This gets alerted after the page has loaded.'",true);
  • A really good answer, full of rationality!

Support us!

If you like this site please help and make click on any of these buttons!

Powered by WordPress Popup