From: Cal Who on
I have realy two websites in one host folder.

To get to one use Default1.aspx to get to the other use Default2.aspx.

Default1 and all the pages that it's menu goes to uses One.master.
Default2 and all the pages that it's menu goes to uses Two.master.

However, there are some pages that should be available from both sites.

So the question is: can I somehow define, at run-time, the master to be used
by a page.

That is, if a page is opened from Default1 I want it to use One.master, and
if it is accessed from Default2 I want it to use Two.master.

Can you tell me how to do that?

Or some other approach?


Thanks in advance



From: Alexey Smirnov on
On May 17, 5:27 pm, " Cal Who" <CalWhoNOS...(a)roadrunner.com> wrote:
> I have realy two websites in one host folder.
>
> To get to one use Default1.aspx to get to the other use Default2.aspx.
>
> Default1 and all the pages that it's menu goes to uses One.master.
> Default2 and all the pages that it's menu goes to uses Two.master.
>
> However, there are some pages that should be available from both sites.
>
> So the question is: can I somehow define, at run-time, the master to be used
> by a page.
>
> That is, if a page is opened from Default1 I  want it to use One.master, and
> if it is accessed from Default2 I want it to use Two.master.
>
> Can you tell me how to do that?
>
> Or some other approach?
>
> Thanks in advance

How many master pages do you have? If there is only one, I would
recommend to copy it between projects. You can set the master
programmatically using the page's PreInit event. But in this case you
would need to refer also to other project (dlls) and this could be a
problem I guess.
From: Cal Who on

"Alexey Smirnov" <alexey.smirnov(a)gmail.com> wrote in message
news:d700aef4-1f3b-445f-887a-d85c0577f957(a)k31g2000vbu.googlegroups.com...
On May 17, 5:27 pm, " Cal Who" <CalWhoNOS...(a)roadrunner.com> wrote:
> I have realy two websites in one host folder.
>
> To get to one use Default1.aspx to get to the other use Default2.aspx.
>
> Default1 and all the pages that it's menu goes to uses One.master.
> Default2 and all the pages that it's menu goes to uses Two.master.
>
> However, there are some pages that should be available from both sites.
>
> So the question is: can I somehow define, at run-time, the master to be
> used
> by a page.
>
> That is, if a page is opened from Default1 I want it to use One.master,
> and
> if it is accessed from Default2 I want it to use Two.master.
>
> Can you tell me how to do that?
>
> Or some other approach?
>
> Thanks in advance

How many master pages do you have? If there is only one, I would
recommend to copy it between projects. You can set the master
programmatically using the page's PreInit event. But in this case you
would need to refer also to other project (dlls) and this could be a
problem I guess.





Two master pages and I'll try to select the active one in PreInit of the
aspx.vb file by using a Session variable.



Thanks



From: Mark Rae [MVP] on
" Cal Who" <CalWhoNOSPAM(a)roadrunner.com> wrote in message
news:hss3pl$3nm$1(a)news.eternal-september.org...

> I thought the idea was so unusual that probably no one had considered it.

I do this all the time:
http://www.sanctuaryrig.co.uk/home/default.aspx
http://www.inthecage.co.uk/home/default.aspx
http://www.jimfaupel.co.uk/home/default.aspx
http://www.manirdonaghue.co.uk/home/default.aspx

Click the "Log in" button or hyperlink in each of the four websites - same
website in each case (see the URL in the address bar), but with different
MasterPages...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

From: Cal Who on

"Mark Rae [MVP]" <mark(a)markrae.net> wrote in message
news:uq4Jpqg9KHA.1184(a)TK2MSFTNGP06.phx.gbl...
>" Cal Who" <CalWhoNOSPAM(a)roadrunner.com> wrote in message
>news:hss3pl$3nm$1(a)news.eternal-september.org...
>
>> I thought the idea was so unusual that probably no one had considered it.
>
> I do this all the time:
> http://www.sanctuaryrig.co.uk/home/default.aspx
> http://www.inthecage.co.uk/home/default.aspx
> http://www.jimfaupel.co.uk/home/default.aspx
> http://www.manirdonaghue.co.uk/home/default.aspx
>
> Click the "Log in" button or hyperlink in each of the four websites - same
> website in each case (see the URL in the address bar), but with different
> MasterPages...
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
I realize now it is not so unusual.

The sites are interesting. One thing I noticed is that you use the e-mail
address as the login username.

I use asp:CreateUserWizard and couldn't manage to do that. It's been a while
but I think the problem I had was that that method actually stores a
username and a e-mail address separately and I was having a problem keeping
them synchronized. Do you make the user type it in as a username and also as
an e-mail address and then check to see if they are the same?


Thanks