What exactly is the point of the ScriptManager's EnablePartialRendering Attribute
Asked Answered
D

3

6

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?

Draftee answered 26/2, 2009 at 16:57 Comment(0)
E
6

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.

Eulaeulachon answered 26/2, 2009 at 17:2 Comment(0)
K
4

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.

Knell answered 26/2, 2009 at 17:3 Comment(1)
Very useful for debugging, thanks that's actually helped me out.Bibby
I
2

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.

Incoordinate answered 10/11, 2009 at 9:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.