Where do you declare ScriptManager - in the UserControl, on the page where the control is located, or in MasterPage?
I would recommend (if possible - the main warning is .NET 3.5 installed on the server) defining the ScriptManager in MasterPage (or page level if you are not using MasterPages), and then using ScriptManagerProxy in your user control:
Includes nested components, such as content pages and user controls, to add script and service links to pages when the ScriptManager control is already defined in the parent element.
Edit to add:
If you cannot use ScriptManagerProxy, then either take a look at the ToolkitScriptManager from the AJAX management toolkit - it gives you many .NET 3.5 ScriptManager features without using 3.5, including the .GetCurrent method:
ScriptManager scriptManager = ToolkitScriptManager.GetCurrent(Page); if (null != scriptManager) {
Alternatively, you can perform this search yourself by iterating through the page control collection that is looking for an instance of ScriptManager.
source share