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 1011155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:11:32+00:00 2026-05-16T09:11:32+00:00

Anyone know if it’s possible to move the HomeController and Home related views into

  • 0

Anyone know if it’s possible to move the HomeController and Home related views into the Areas directory?

I’m trying to keep my root directory nice and clean and avoid having the ~/Views and ~/Controllers directories if I can. Furthermore, I can see it causing some confusion by having to explain that those root folders are for homepage stuff only and everything else lives in the Areas folder. It just doesn’t fit with my sense of organization, I guess.

The closest I’ve come is using the following for my Home area route registration:

context.MapRoute(
    "Home_default",
    "Home/{action}/{id}",
    new { controller="Home", action = "index", id = UrlParameter.Optional }
);

… But this doesn’t catch just plain “www.mydomain.com/”. For that I need to tell my “catch all” route in the Global.asax to somehow send that request over to my Home area. Simply adding area=”Home” to the route data didn’t work. A request for “/” is still looking for the HomeController and Views in my root directory.

Any ideas?

  • 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-05-16T09:11:33+00:00Added an answer on May 16, 2026 at 9:11 am
    // These additions allow me to route default requests for "~/" to the "home" area
    engine.ViewLocationFormats = new string[] { 
        "~/Views/{1}/{0}.aspx",
        "~/Views/{1}/{0}.ascx",
        "~/Areas/{1}/Views/{1}/{0}.aspx", // new
        "~/Areas/{1}/Views/{1}/{0}.ascx", // new
        "~/Areas/{1}/Views/{0}.aspx", // new
        "~/Areas/{1}/Views/{0}.ascx", // new
        "~/Views/{1}/{0}.ascx"
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone know if it is possible to make the PeriodicalUpdater pass the data it
Anyone know if it's possible to databind the ScaleX and ScaleY of a render
Anyone know if it's possible to access the name of a jump link in
Anyone know how to move a live Quickbooks Online company to the Test site?
Anyone know if it's possible to set the upper left corner of the Android
Anyone know if it is possible to ignore all the instances of a particular
Anyone know of any documentation that would help me with trying to embed a
Anyone know how to inject an ant build date time stamp into an html
Anyone know if it is possible to write an app that uses the Java
Anyone know how I can make a login button in Ruby on Rails for

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.