Wednesday, March 4, 2009

What's the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript?

RegisterClientScriptBlock is for returning blocks of client-side script containing functions. RegisterStartupScript is for returning blocks of client-script not packaged in functions-in other words, code that's to execute when the page is loaded. The latter positions script blocks near the end of the document so elements on the page that the script interacts are loaded before the script runs. <%@ Reference Control="MyControl.ascx" %>

No comments:

Post a Comment

About Me

Hyderabad, Andhra Pradesh, India
I'm a MCA graduate working as a Web Developer.