VS problem with MasterPage set in Web.Config

Last post 11-23-2005 3:39 PM by ibrahimm. 1 replies.

Sort Posts:

  • VS problem with MasterPage set in Web.Config

    11-22-2005, 11:10 PM
    • Member
      25 point Member
    • Yshmael2
    • Member since 01-05-2004, 10:53 AM
    • Posts 5
    I am having a problem with a website project in VisualStudio 2005. I set a masterPageFile in the web.config file and then tried to add/work with a content control within the site. Unfortunately, if I don't include a MasterPageFile property in the Page directive, intellisense will not work, design view won't render content (no big deal there, as I rarely use design view), and the content tags and other page items show all kinds of errors. The page compiles ok and displays as expected by applying the MasterPage when I debug, but the best features of the IDE are either unavailable (which is bad) or feeding me incorrect information (which is worse).

    Does anyone know if this is just a stupid error on my part? A known bug? I love the idea of a single setting to apply the masterpage to the entire site. The feature is pretty much useless, though, if the development environment doesn't recognize it. I know this isn't a huge deal, as it doesn't require a ton more typing to include the setting in each page instead, and masterpages in general are a terrific addition for ASP.Net. I just like to keep settings like this in as few places as possible to ensure I don't have to dig to replace multiple hidden occurances down the road.
  • Re: VS problem with MasterPage set in Web.Config

    11-23-2005, 3:39 PM
    • Member
      60 point Member
    • ibrahimm
    • Member since 11-04-2002, 3:05 PM
    • Posts 12
    • AspNetTeam
    The designer in Visual Studio 2005 doesn't support Master page file associations defined in web.config.  A reasonable design-time only workaround would be to add an empty MasterPageFile attribute (MasterPageFile="") to the Page directive.  Although this doesn't lead to "true" Master-Content based intellisense, validation and preview of the existing/default Master content, it should, say, provide intellisense for <asp:content> tags along with a design-view experience for any customized content controls. 

    Hope this helps.
    - Ibrahim
Page 1 of 1 (2 items)