Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Changing ScriptManager's property EnablePartialRendering from a masterpage

$
0
0

Hi,

I'm creating a small community site, where users can enable or disable partial rendering by setting their profile property (it is needed because not all browsers support AJAX yet). I added ScriptManager to a masterpage. And added the code to enable or disable partial rendering to the masterpage's Page_Load. But I've got this error:

Cannot change the value of EnablePartialRendering on ScriptManager or ScriptManagerProxy after PreInit.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Cannot change the value of EnablePartialRendering on ScriptManager or ScriptManagerProxy after PreInit.

The problem is that masterpage doesn't support Page_PreInit event. Is there any way to enable or disable partial rendering from within a master page based on the user's profile settings (without adding PreInit code  to the every page of the site)?

Thank you in advance,
Roman


Viewing all articles
Browse latest Browse all 5678

Trending Articles