Wednesday, March 21, 2012

Is is better to use multiple UpdatePanels

I just switched from MagicAjax, where it was best to break the page up into as many AjaxPanels as possible to make the page go faster.

With Atlas is it preferable to put the whole page inside of an UpdatePanel, or to use multiple UpdatePanels, or UpdatePanels inside of other UpdatePanels to increase speed?

What I'm asking is, does Atlas automatically send least possible html back to the page, or do I need to try to have my UpdatePanels contain only the necessary parts of the page?

You probably want to have multiple updatepanels -- one for difference portions of the page. UpdatePanels support both an "always" and "conditional" mode of rendering. Conditional means it only renders if it has to (for example: a trigger fires or you manually call update on it, or a control within it caused the postback). A best practice would be to use conditional rendering to only send down the HTML you require.

Hope this helps,

Scott


Alright, thanks for clarifying that. I'll remember that next time before I wrap my entire masterpage in an update panel, and set it to always.Smile [:)]

No comments:

Post a Comment