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

Answer Posted / aadesh kumar

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" %>

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do sessions work?

733


What are the disadvantages of asp.net?

824


Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc

743


What is the Intermittent crashing of application in production?

796


Where is cookie used in asp.net?

805


What is css and what is it used for?

773


Name the method that needs to be invoked on the dataadapter control to fill the generated dataset with data?

746


What is microsoft windows sharepoint services?

790


Where do the cookie state and session state information be stored?

720


How we can force all the validation controls to run?

758


What is Pre-Render event in ASP.NET?

836


What is clickid?

793


When Cookies are expired in ASP.NET?

795


What is a web api? Which protocol is used in a web api?

769


What is role-based security in asp.net?

749