MasterPages with Ajax

  • Thread starter Thread starter Rodrigo Ferreira
  • Start date Start date
R

Rodrigo Ferreira

Hi,

I´m trying to create a master-content page that does not refresh all the
page when a link is click, I mean that only the content page should be
refreshed. How to do this?
Thanks
 
No. This won't work. Updatepanels and Ajax are designed to work on parts of
a page by replacing content with data returned from the processing page.
It's not used for navigating from one page to another and that would
probably break things because the Viewstate and control tree is suddenly
very different since they are from two different pages.

You may have seen something that would lead you to believe this is a
possibility. The way this look is usually accomplished is to have the links
act as linkbuttons, which when posted back to the server load a user control
into a container such as a placeholder control. The timing of this can be
tricky and is not for the feint of heart as it can be very maddening to get
the timing and state management just right.
 
What we do is use ASP.NET 2.0 MasterPages on the server. When the page is
compiled on the server it is returned to the client as HTML and client-side
script, e.g. AJAX. When using MasterPages there is nothing that prevents us
from using a script manager and an update panel in our HTML being compiled
on the server. When the page is returned to the client the functionality
intended to be provided by the update panel is done using the client-side
script, e.g. AJAX. Anybody may interact with the page to click a button for
example and refresh a grid with data (update the content in the panel)
without sending then entire page back and forth to the server.

Here's how to get started learning how to achieve this:

//google or search.live.com
masterpages overview site:msdn2.microsoft.com

// videos, forums and related code
// to learn MasterPages and AJAX
http://asp.net/


<%= Clinton
 
Back
Top