top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

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

0 votes
51 views
What's the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript?
posted Sep 28, 2015 by Jayshree

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

RegisterClientScriptBlock is for returning blocks of client-side script containing functions. RegisterStartupScript is for returning blocks of client scripts, 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 with are loaded before the script runs. <%@ Reference Control="MyControl.ascx" %>

answer Sep 28, 2015 by Shivaranjini
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...