ASP.Net Programming Question:

What is the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript?

Tweet Share WhatsApp

Answer:

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

Download ASP.Net PDF Read All 28 ASP.Net Questions
Previous QuestionNext Question
How do I debug an ASP.NET application that was not written with Visual Studio.NET and that does not use code-behind?Is it necessary to lock application state before accessing it?