2

For those who setup muli project areas in ASP.NET MVC 2 in VS 2010, I have a few questions for you:

  • Can other project areas use one master page? Or does each have to have their own master page?
  • What about the web.config file? Does each area need the config file? Or does it rely on the master?
  • I tried removing the master page reference, but I get an intellisense error and failed to monitor changes after following this: http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx

I assume I need to leave in the master page so that at least works.

Thanks.

Brian Mains
  • 50,520
  • 35
  • 148
  • 257

1 Answers1

1

Can other project areas use one master page?

Yes. The master page is just a file, and it can be referenced anywhere in your application

What about the web.config file?

There is a web.config in each area. In my application they all look exactly the same, so I assume the application is taking its settings from each individual web.config, and that the root area also has its own individual settings in the root web.config.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
  • 1) OK, how do you make the reference being that the area projects are at the same level, do you do ../MasterProject/Site/Shared/site.master or something like that? What reference do you specify? 2) OK, I assume it will ignore the master config, but I'll leave it there and modify the parent project config only. Thanks. – Brian Mains Feb 12 '10 at 13:43
  • If the master page is being shared by more than one area, it should reside at the root of the application (in its usual place). – Robert Harvey Feb 12 '10 at 15:15
  • Ah, I see, there is a web.config in each area. In my application they all look exactly the same, so I assume the application is taking its settings from each individual web.config, and that the root area also has its own individual settings. – Robert Harvey Feb 12 '10 at 15:19
  • This sounds more like a single-project, but multi-area answer. How does one reference a master page in a separate project (but within the same site)? – 3Dave May 06 '10 at 15:42