יש לך דף ללא מאסטר. אתה צריך להחליט אם אתה כן רוצה מאסטר או לא רוצה מאסטר layout. אז הוא החליט שהוא בעצם רוצה מאסטר אם הבקשה שהוא ביצע אינה AJAX. מה שקורה הדף הראשון שהוא נכנס אליו מגיע לא מ AJAX ולכן נטען עם המאסטר ונראה משהו כזה:
and your page looks like this: <div> // blah blah page </div>
when you load you page without a master it looks like: <div> // blah blah page </div>
when you load it with a master it looks like this: <div> // blah blah <div id="mainContent"> <div> // blah blah page </div> </div> // blah blah </div>
Now when you move to the next page it can be done in two ways: 1. Request the full page via a url(http get) without an ajax -> you load the master page as well. Same as your first request. This will probally be done with window.location.href = getNextPageUrl(); . The server will realize that this isn't an Ajax request and will load the layout as well.
2. Use JQuery.load for loading the next page -> load it without a master since the master is already loaded.
The server will recieve a request and it will realize this is an Ajax request(XmlHttpRequest) and therefore it will set the layout to be null. You are loading a subset of you page(you have the master and your replacing the main div).
ברגע שתשנה את ה URL אתה תגרום לget שיביא את הדף מהשרת עם המאסטר. אם אתה ממש צריך את זה אז תרד מכל ה ajax page routing ותבנה דפים רגילים עם מאסטר שתביא אותו כל פעם מחדש.