Hi
I've just recently upgraded to VS2005 and started using/learning about the
Master Pages.
I'd like to know if it is possible to have separate web app projects use the
master page(s) from their "parent" site.
E.g.:
Main site at http://localhost/mainsite/
sub-app at http://localhost/subsite/
I'm considering using masterpages for our company website overhaul, so these
development locations would eventually map to the real locations of:
main site: http://www.myrealsite.com
sub-app: http://www.myrealsite.com/sub-app-name
(We host our site ourselves)
My reason for asking is motivated by the pre-compiled/site publishing
process of VS2005, which wants to delete any existing target files before
transferring the new versions. For a moderate or larger sized site this
would not be a desirable feature, even if it is quick in operation.
For example, I want to create a separate project/app that looks after a
specific requirement (say a questionairre, or quality feedback forms) that
uses the same master page(s) as the root site.
I guess I'm asking if it's possible to implement similar referential pathing
as I'm used to with stylesheets, etc (e.g. ../styles/global.css)? The
default pathing is app-specific (~/).
I've tried <%@ Page Language="VB" MasterPageFile= "../copeohs/copeohs.master"
....
but get the server error of "The virtual path '/copeohs/copeohs.master' maps
to another application, which is not allowed."
Also tried: MasterPageFile= "http://localhost/copeohs/copeohs.master"
but this returns "Parser Error Message:
'http://localhost/copeohs/copeohs.master' is not a valid virtual path." (The
path is correct but I assume this is IIS security preventing user-client
delivery of the master file.)
I don't want to use templates, as the idea is to have the masterpages hold
the menu content and thus greatly reduce maintenance requirements. I would
be using a root master for the global menu, plus nested master pages to
provide sub-section menus.
I've done some googling on the subject, but haven't (yet) come across anyone
discussing the particular aspect of separate projects sharing the master file.
Is it even possible - or am I barking up the wrong tree?
Appreciate any pointers to articles, etc, or specific methods.
Thanks.