Access ScriptManager in a Master Page from Content Page

  • 6/12/2008
  • Author: Brian Pautsch
  • Category: Code Snippets
  • 1306 Views
  • 0 Comments
  • Bookmark and Share

I recently had to access the ScriptManager in a Master Page from one of the Content Pages.
I first tried to perform a FindControl(), but there's a much easier way.
There is a static method in the ScriptManager class called "GetCurrent()" which provides access to the current instance of the ScriptManager.


//Extend script manager timeout to 10 minutes

ScriptManager.GetCurrent(this).AsyncPostBackTimeout = 600;

User Comments

No comments yet. Be the first to leave a comment!

Leave a Comment

Name: E-Mail: URL: Security Code: Type Code: Comments: