Just wanted to know how register startup script works.
It gets called as the page is loaded.
RegisterStartupScript demonstrates injecting client side script from an ASP.NET Server Control.
The idea is to inject a script that gets called as soon as the page loads. Simple javascript. But this can be done on the fly using registerstartup script.
Difference Between RegisterClientScript & RegisterStartupScript
The main difference is that the RegisterStartupScript method places the JavaScript at the bottom of the ASP.NET page right before the closing </form> element. The RegisterClientScriptBlock method places the JavaScript directly after the opening <form> element in the page.
|