views:

1121

answers:

3

Why would one want the EnablePartialRendering attribute to ever be "false" if building AJAX functionality into pages? Seems counter-productive. I've read here and there some things one may want to do with the attribute being false. But what I've read makes no sense.

Thoughts?

+3  A: 

I've used that attribute in testing before, to force a full "yellow screen" for server-side errors. Much easier to debug a quick server-side issue that way, than to inspect the error in the Event Log or the XmlHttpRequest's error response.

Also, one thing that it's not good for is preventing MicrosoftAjax.js from being injected. I've tried that in the past, hoping I could use the ScriptManager's script combining stand-alone. Unfortunately, no, it still injects MicrosoftAjax.js.

Dave Ward
+1 on all charges.
Daniel Schaffer
+2  A: 

Eilon Lipton made a note of this issue (and the SupportsPartialRendering property)in his blog. Of interest to note:

EnablePartialRendering is intended for the page developer. That is, the person who is building the ASP.NET page and placing the ScriptManager on it. They get to decide whether they're interested at all in using the partial rendering feature. For example, for optimization purposes they might disable the partial rendering feature entirely to prevent any extra script from being downloaded. Or perhaps to debug an issue they want to temporarily disable UpdatePanels from doing async postbacks.

Dillie-O
Very useful for debugging, thanks that's actually helped me out.
Iain M Norman
A: 

Because not all web browsers (through some strict security policies) will allow ajax enabled postbacks to work so when building a centralised application that multiple companies/corporations can use, changing this setting means the site will still work without partial rendering and will work for companies/corporations or other users that do support full ajax without having to build two versions of the site.

I have found EnablePartialRendering incredably useful and saved hundreds of hours of hours needing to build a non ajax version of the site and no matter how much you hate it or disagree, there is little or no change the minds of the security managers of massive international companies from changing the policies just so your application will work on their internet domains for their staff.

Dave