C# – How to get the ScriptManager of Master Page into Child page’s code behind c# (.cs) file

asp.netcmaster-pagesscriptmanager

Following is the web site environment I created:

  1. I have a Master page.
  2. I have created a Child page from it.
  3. I have placed Script Manager on the Master page.

Now I want to access that Master page's Script Manager to create a User Control dynamically in my code behind (C#) file.

How can I access Script Manager placed on master page to my child page.

Best Answer

I got it, its given in ScriptManager class itself.

System.Web.UI.ScriptManager.GetCurrent(this.Page);