I am prototyping an environment where several applications run on the same server, but they all share the main page.
Can I load the main page from another application? In one of my applications, I have this code:
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
this.MasterPageFile = "~/../MasterPages/Root.master";
}
What this means is, set the home page to a file sitting outside of my current application. (Note the ".." after the tilde - so I go to the root of my current application and then expand the directory to find the main page.)
ASP is unhappy with the following:
The virtual path '/MasterPages/Root.master' maps to another application, which is not allowed.
I understand that it would be possible to emphasize the fact that there is no support class for it, but what if I have nothing in the code and I decided not to inherit my main page from anything - so the whole thing is contained in the file. master?
?