ASP.Net Programming Question:

Download Job Interview Questions and Answers PDF

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

ASP.Net Interview Question
ASP.Net Interview Question

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 Interview Questions And Answers PDF

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?