What is the The Difference Between Page.ClientScript.RegisterStartupScript and Page.ClientScript.RegisterClientScriptBlock ?

Monday, July 20, 2009


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.

RegisterClientScriptBlock will fire error if used with controls before load as it is inserted immediately after </form>, because the control would not have been loaded.




www.codecollege.NET


Daily Tips- Tip #14 - How will associate a clientside script with Asp.net Button server control ?

0 comments

Post a Comment

LinkWithin

Blog Widget by LinkWithin

Recommended Books