tags:

views:

41

answers:

2

Hello,

In asp.net is it a requirement to rebuild the whole page during every callback? For example my web page is split into three distinct areas and I have an update panel for each area. Lets say I want to update the third area, do I have to bother with any processing of the other two areas?

For example lets say there is a grid view in area two. The update panel in area three callbacks to update its content. Do I have to rebind the grid in area two?

Thanks,

AJ

+1  A: 

Yes, this is how ASp.NET is done. If you use an updatePanel / AJAX partial update, you may get away building only part of the page. But then, your viewstate may be a problem.

What you see is basically one of the disadvantages of the ASP.NET model.

TomTom
+1  A: 

By default, "UpdateMode" is set to "Always" for UpdatePanels which means they update whenever anything "happens" on the page.

Try setting "UpdateMode" to "Conditional" for all your three UpdatePanels and see if that helps. (FWIW this is standard practice for me as part of writing the UpdatePanel definition. If you need to update an UpdatePanel when something happens on a different part of the page, you can use Triggers or update it with .Update() in code behind)

bgs264

Edit

I think I misunderstood your question originally; my suggestion above may improve page rendering times as partial postbacks result in less code being sent back and forth between client and server.

But yes as per other answer, all the controls have to go through their lifecycle (Init, Load, Render) on every page load / postback.

bgs264