Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8083121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:21:27+00:00 2026-06-05T17:21:27+00:00

My setup require 2 level of master page because I am loading data in

  • 0

My setup require 2 level of master page because I am loading data in Master Master which is shared across my application with different Nested Masters.

So right now I need Master Master to load my data first, then load stuff in Nested Master, then load stuff in Page.

When I had just one level of master, I setup my load order as so:

  1. Nested Master – Init
  2. Page – Load

Now that I have an extra level of Master, how do I load in the following order?

  1. Master Master – ?
  2. Nested Master – ?
  3. Page – ?

This is a problem because ASP.NET for some reason load the inner most level first. So let’s say giving the same function, ASP.NET will call in the order of Page->Nested->Master instead of what would make sense: Master->Nested->Page. Which in my personal opinion completely defeat the purpose of having a master page system.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:21:28+00:00Added an answer on June 5, 2026 at 5:21 pm

    Short answer is PreRender, however sounds like you could benefit from moving some logic our of your master pages and into business objects/classes? Having different master pages depending on each other is probably not the best idea.
    If you need data to be available globally – load it in a business class, and cache it once created for however long is suitable (if just for the request use HttpContext.Items).

    If you do need to stick with that setup, you also have the option of calling up through the masterpage hierarchy – so your root master (top level) can make options/data available OnInit.
    Anything else that needs this can then call – here’s a method that loops all the masterpages in any given pages hierarchy and return first instance of required type:

    /// <summary>
    /// Iterates the (potentially) nested masterpage structure, looking for the specified type.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="currentMaster">The current master.</param>
    /// <returns>Masterpage cast to specified type or null if not found.</returns>
    public static T GetMasterPageOfType<T>(MasterPage currentMaster) where T : MasterPage
    {
        T typedRtn = null;
        while (currentMaster != null)
        {
            typedRtn = currentMaster as T;
            if (typedRtn != null)
            {
                return typedRtn; //End here
            }
    
            currentMaster = currentMaster.Master; //One level up for next iteration
        }
    
        return null;
    }
    

    To use:

    Helpers.GetMasterPageOfType<GlobalMaster>(this.Master);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to set up message level security for a WCF application that
Hi I have a evolving core data model setup as follows: lookup -> detail
My main application is written in Java, which has Main.jar. I am preparing final
I've already got my subversion repository set up to require comments of a minimum
What's the minimum boilerplate code required to setup an OpenGL view (with the necessary
My setup for CUDA Visual Studio 2010 and 2008 SP1 (required by CUDA). Parallel
SETUP: Using Google Apps Script's UI (doGet) with tabPanel option. At the bottom of
Setup: A--< B >-- C . On A there is a RFS on B,
setup.py from distutils.core import setup import py2exe setup(console=['program.py']) The error Traceback (most recent call
Setup I am using custom Forms Authentication - all standard stuff. In the Login

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.