Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9274375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:20:23+00:00 2026-06-18T16:20:23+00:00

I have an MVC4 web app and have created 2 areas. I cannot see

  • 0

I have an MVC4 web app and have created 2 areas. I cannot see how to use different layouts for them. When I created the areas there was not a shared folder generated for them,
I have tried creating one in the area named BO and copying the _layout.cshtml file there, no luck. Copied the _viewstart.cshtml file there,
renamed the _layout.cshtml to and changed the layout call in the BO area’s _viewstart.cshtml to

Layout = ~/Areas/BO/Shared/Views/_BOLayout.cshtml";

still no luck, neither the layout nor the css & JS files are loading when I navigate to the BO area home page.
Lots of stuff around on making areas use the root _layout.cshtml but I cannot find much on using different ones for each area. Any suggestions please?

PS. The above (Copied the _viewstart.cshtml file there) also breaks things; I get: Type ‘ASP._Page_Areas_BO__ViewStart_cshtml’ does not inherit from ‘System.Web.WebPages.StartPage’. Error on navigating to the area.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:20:24+00:00Added an answer on June 18, 2026 at 4:20 pm

    The following structure should work for an Admin area for example:

    ~/Areas/Admin/Views/Shared/_AdminLayout.cshtml:

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title></title>
    </head>
    <body>
        @RenderBody()
    </body>
    </html>
    

    ~/Areas/Admin/Views/_ViewStart.cshtml:

    @{
        Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
    }
    

    ~/Areas/Admin/Views/Foo/Index.cshtml:

    <h2>Index view of FooController in Admin area</h2>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running Win 7, IIS 7.0, VS2012 I have created asp.mvc4 web app
I have created an MVC4 Web App with Windows Auth. Is it possible to
I have a c# mvc4 twitter bootstap appharbor web site. Currently I use Vimeo
I have developed an web app using MVC4- mobile and HTML5. Every things is
I have an MVC4 web app that needs 12 jQuery Mobile pages. Welcome Login
I have a custom Principal/Identity for my ASP.NET MVC4 web app. I have also
I have a simple solution with 3 projects: Asp.Net MVC4 Web app - the
I have a custom ViewEngine that I am using with my MVC4 web app.
I have created a simple web application which runs locally and makes use of
I have an MVC4 web application In setting it up on IIS7.5 I added

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.