|
-
Oct 31st, 2011, 07:36 AM
#1
Thread Starter
Hyperactive Member
[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
-
Oct 31st, 2011, 08:26 AM
#2
Thread Starter
Hyperactive Member
Re: Dynamically select master page?
Found the answer, it must be done in the Page_PreInit function
-
Nov 1st, 2011, 02:27 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|