Wednesday, March 28, 2012

Multiple updatepanels vs single updatepanel

Hi,

Anybody got any information regarding the trade off with having either a single updatepanel encapsulating a large number of databound controls (each of which can be independently updated) or multiple updatepanels each surrounding a single databound control?

Any advice or pointers would much appreciated.

Brendy

The answer depends on what gets updated and the dependency that the controls have on each other. Typically, you want to use UpdatePanels to only update fragments of the page that need to be updated, leaving the other areas intact. This technique will also reduce the amount of data that is coming back down from the server to render the page.

So if some controls don't need to be updated regularly, then they belong within their own UpdatePanel (with the UpdateMode set to Conditional).


hi, many thanks for your reply. What I really want to know is, is there a point at which adding more updatepanels to a page starts to have a negative impact on performance? The page that I have has a 10x10 matrix with each cell containing a number of independent datadriven controls. So what's the tradeoff between having one update panel covering the entire matrix or 100 updatepanels one for each cell? Does this slow down the page load?

Cheers

Brendy

No comments:

Post a Comment