The content pages in my project have ScriptManager control but the Master Page does not have. I now want to use UpdatePanel in the master page but it is not permitting to put another ScriptManager.
I cannot change to ScriptManagerProxy in content pages as the change needs to be replicated to around fifty pages.
Is there any way to use UpdatePanel in Master Page by either sharing content page's ScriptManager or something else?
"Any ASP.NET page that includes an UpdatePanel control also requires a ScriptManager control. To use UpdatePanel controls with master pages, you can put a ScriptManager control on the master page. In this scenario, the master page provides a ScriptManager control
for every content page. If you do not want partial-page updates enabled for individual content pages, you can disable partial-page updates for those pages.
Alternatively, you can put the ScriptManager control on each content page. You might do this if only some of the content pages will contain UpdatePanel controls."
...so you can't have the ScriptManager on both the content an master page.
Any ASP.NET page that includes an UpdatePanel control also requires a
ScriptManager control. To use
UpdatePanel controls with master pages, you can put a
ScriptManager control on the master page. In this scenario, the master page provides a
ScriptManager control for every content page. If you do not want partial-page updates enabled for individual content pages, you can disable partial-page
updates for those pages.
A Web page can contain only one ScriptManager control, either directly on the page or indirectly inside a nested or parent component. The
ScriptManagerProxy control lets you add scripts and services to content pages and to user controls if the master page or host page already contains a
ScriptManager control.
When you use the ScriptManagerProxy control, you can add to the script and service collections defined by the
ScriptManager control. If you do not want to include specific scripts and services on every page that includes a particular
ScriptManager control, you can remove them from the
ScriptManager control. You can then add them to individual pages by using the
ScriptManagerProxy control instead.
</div>
Chetan Sarode
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
rpk2006
Member
631 Points
629 Posts
How to use ScriptManager in master page when content pages already have ScriptManager?
Nov 26, 2012 04:42 PM|LINK
The content pages in my project have ScriptManager control but the Master Page does not have. I now want to use UpdatePanel in the master page but it is not permitting to put another ScriptManager.
I cannot change to ScriptManagerProxy in content pages as the change needs to be replicated to around fifty pages.
Is there any way to use UpdatePanel in Master Page by either sharing content page's ScriptManager or something else?
Basquiat
Contributor
2387 Points
653 Posts
Re: How to use ScriptManager in master page when content pages already have ScriptManager?
Nov 26, 2012 05:11 PM|LINK
From MSDN:
"Any ASP.NET page that includes an UpdatePanel control also requires a ScriptManager control. To use UpdatePanel controls with master pages, you can put a ScriptManager control on the master page. In this scenario, the master page provides a ScriptManager control for every content page. If you do not want partial-page updates enabled for individual content pages, you can disable partial-page updates for those pages.
Alternatively, you can put the ScriptManager control on each content page. You might do this if only some of the content pages will contain UpdatePanel controls."
...so you can't have the ScriptManager on both the content an master page.
oned_gk
All-Star
31808 Points
6504 Posts
Re: How to use ScriptManager in master page when content pages already have ScriptManager?
Nov 27, 2012 12:33 AM|LINK
Place scriptmanager in master page, remove scriptmanager in all pages.
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: How to use ScriptManager in master page when content pages already have ScriptManager?
Nov 27, 2012 02:32 AM|LINK
Any ASP.NET page that includes an UpdatePanel control also requires a ScriptManager control. To use UpdatePanel controls with master pages, you can put a ScriptManager control on the master page. In this scenario, the master page provides a ScriptManager control for every content page. If you do not want partial-page updates enabled for individual content pages, you can disable partial-page updates for those pages.
http://msdn.microsoft.com/en-us/library/bb398864(v=vs.100).aspx
<div class="subsection">A Web page can contain only one ScriptManager control, either directly on the page or indirectly inside a nested or parent component. The ScriptManagerProxy control lets you add scripts and services to content pages and to user controls if the master page or host page already contains a ScriptManager control.
When you use the ScriptManagerProxy control, you can add to the script and service collections defined by the ScriptManager control. If you do not want to include specific scripts and services on every page that includes a particular ScriptManager control, you can remove them from the ScriptManager control. You can then add them to individual pages by using the ScriptManagerProxy control instead.
</div>Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
nikunjnandan...
Participant
882 Points
223 Posts
Re: How to use ScriptManager in master page when content pages already have ScriptManager?
Nov 27, 2012 04:38 AM|LINK
Hii,
Put your script manager in master page.
Remove from all other webforms.
in one page only script manger is there.not more then once.
Using script manager in webforms is not good practice.
Put it in master page so you don't have put again.
Nikunj Nandaniya
My Blog