Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 05, 2013 11:20 PM by sATsvelKe
Apr 04, 2006 05:58 AM|LINK
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:
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,
Apr 04, 2006 09:34 AM|LINK
Apr 04, 2006 11:21 AM|LINK
well i think that won't work because according to the message, it has to be done unit the preinit work. my suggestion is to build a base page that does that in the preinit event (and then this page will serve as base to all the other pages that exist on
Apr 04, 2006 11:57 AM|LINK
Apr 04, 2006 01:19 PM|LINK
well, as i recall it, no you cannot because after firing the preinit event, the page applies the master and then it fires the init event. that's why you can alter the master dinamically until the preinit event :(
Apr 05, 2006 12:52 AM|LINK
Everybody, thank you for help!
I probably will use the base class approach ;-)
BTW I have found this link
Is it possible to use the method described there?
Apr 05, 2006 10:21 AM|LINK
yes, you can...
Feb 05, 2013 11:20 PM|LINK
how to change the property of script manage on timer tick .I am getting error
The EnablePartialRendering property cannot be changed after the Init event.
any solution for this thanksi advance