What is the difference between ScriptManager.RegisterStartupScript method and ScriptManager.RegisterClientScriptBlock method?

 Posted by vishalneeraj-24503 on 6/6/2014 | Category: ASP.NET Interview questions | Views: 444 | Points: 40
Answer:

Both are used to call any Javascript function or show MESSAGE in code-behind but we can not access any Page control through ScriptManager.RegisterClientScriptBlock method whereas we can access any control via ScriptManager.RegisterStartupScript method.So if we want to show any Messages then use RegisterClientScriptBlock method and if you want to call any page control then use RegisterStartupScript method.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response