Results 1 to 3 of 3

Thread: [RESOLVED] Dynamically select master page?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2005
    Posts
    323

    Resolved [RESOLVED] Dynamically select master page?

    Hi all,

    Is it possible to select on page load or page pre load a different master page depending on a number of parameters?

    a simple example would be if the device is mobile, use master page A, otherwise use master page b.

    Can this be done?

    Thanks,
    J

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2005
    Posts
    323

    Re: Dynamically select master page?

    Found the answer, it must be done in the Page_PreInit function

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Dynamically select master page?

    Hello,

    For anyone who is having the same problem/issue, you might want to take a look at the following article:

    http://www.asp.net/master-pages/tuto...ammatically-vb

    Which discusses the ASP.Net Page Life Cycle and why this particular setting has to be made so early in the loading of the page.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width