M
Mark Rae
Hi,
Is it possible to have programmatic access to the Page object in
Application_BeginRequest, or is it too early in the lifecycle...?
E.g. to be able to change a page's MasterPage dynamically, something like:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
if (Session["LoggedOn"] == "True")
{
<page>.MasterPageFile = "~/loggedOn.master";
}
else
{
<page>.MasterPageFile = "~/notLoggedOn.master";
}
}
N.B. I realise it's possible to achieve the above functionality in other
ways - it's just a hypothetical example...
Any assistance gratefully received.
Mark
Is it possible to have programmatic access to the Page object in
Application_BeginRequest, or is it too early in the lifecycle...?
E.g. to be able to change a page's MasterPage dynamically, something like:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
if (Session["LoggedOn"] == "True")
{
<page>.MasterPageFile = "~/loggedOn.master";
}
else
{
<page>.MasterPageFile = "~/notLoggedOn.master";
}
}
N.B. I realise it's possible to achieve the above functionality in other
ways - it's just a hypothetical example...
Any assistance gratefully received.
Mark