Questions tagged [asp.net-mvc-areas]

An organizational concept present in ASP.NET MVC, that allows the developer to partition a large web application into smaller units.

An organizational concept present in ASP.NET MVC, that allows the developer to partition a large web application into smaller, distinct units. Areas might be used to, for instance, divide an application into inventory, review, storefront, and administration modules.

More information

575 questions
4
votes
1 answer

Redirection from MVC area redirects me to top level action?

I have following project structure. Where I have two Home and Account controller one inside Test Area and one at route level project. Now after login from area I want to redirect area's Home Index But it redirects me to route level Home Index. Test…
Manjay_TBAG
  • 2,176
  • 3
  • 23
  • 43
4
votes
1 answer

how big should your controllers be in asp.net-mvc

i see the new feature of areas in asp.net-mvc 2. it got me thinking. why would i need this? i did some reading on the use cases and it came down to a specific point to me around how big and how broad scope should my controllers should be? should i…
leora
  • 188,729
  • 360
  • 878
  • 1,366
4
votes
1 answer

Is there a MVC SiteMap Provider that supports ASP.NET MVC 2 Areas feature?

I am looking for a MVC SiteMap provider in which I can specify area as well, along with controller and action. Did anyone use a SiteMap provider that supports MVC 2 Areas ?
Mahesh Velaga
  • 21,633
  • 5
  • 37
  • 59
4
votes
1 answer

ASP.NET MVC 2 RC areas and shared models

Once new area is created by the means of Visual Studio context menu, there are three folders: Controllers, Models, Views. Is it supposed that every area should have it's own model classes? Or is it acceptable/widely-used/good for all areas to share…
Anthony Serdyukov
  • 4,268
  • 4
  • 31
  • 37
4
votes
1 answer

Asp.net MVC 3 routing area fail

I have this routes: My website route on WebSite/Global.asax.cs: namespace WebSite { public class MvcApplication : HttpApplication { public static void RegisterRoutes(RouteCollection routes) { …
Cesar
  • 3,519
  • 2
  • 29
  • 43
4
votes
1 answer

Asp.Net MVC Areas, how can I use them?

I've got two questions about Asp.Net MVC areas. I have only a shallow understanding of areas from what I've heard about them in various podcasts but I think I understand fairly well what they're supposed to be used for. Now my question is if I could…
Patrik Hägne
  • 16,751
  • 5
  • 52
  • 60
4
votes
4 answers

Using Same Code in Different Mvc Solutions

I'm using asp.net mvc 3 and .net framework 4.0 with C# Let's say I have NivoSlider( a slider ) html code. Also it has js, css and image files. I want to use the NivoSlider cshtml code and js/css/images as "a project" and I want to add it to…
Lost_In_Library
  • 3,265
  • 6
  • 38
  • 70
4
votes
4 answers

Asp.net Mvc areas routing issue

I want default page of the site to be Login.cshtml. I get the Exception: Error: The view 'LogIn' or its master was not found or no view engine supports the searched locations. The following locations were searched: I have 2 areas. Structure is…
ftdeveloper
  • 1,053
  • 3
  • 26
  • 50
4
votes
2 answers

Using MVC HtmlHelper extension method in a View within an Area

I have an HtmlHelper extension method that pulls in localized text from a database cache. The code is like this. (MVCWeb is the namespace of my MVC app.) using System.Web; using System.Web.Mvc; namespace MVCWeb.PresentationExtensions { public…
AndrewR
  • 6,668
  • 1
  • 24
  • 38
4
votes
1 answer

Does ASP.net MVC 4 have some standardized way of referring to relative paths in JavaScript?

I'm working on an ASP.net MVC application. One thing that I really like about ASP.net MVC is the way that it allows you to refer to relative paths in server-side code. I was wondering if there is some standardized way of doing this in client-side…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
4
votes
1 answer

MVC Code restructure

I have a huge MVC application but unfortunately MVC Areas were not used in initial development. The application is becoming so modular that we feel there is a good case to be made for using Areas. How easy or hard is to move the entire code to…
ZVenue
  • 4,967
  • 16
  • 61
  • 92
4
votes
1 answer

Using a Webform in an MVC3 Area

I am trying to integrate an old ReportViewer Webform into my current MVC3 project. I would like it to be available at http:///Reports/ViewReport.aspx. At first I created a folder in the root of my project titled Reports, dumped the page in…
user1013571
  • 125
  • 1
  • 7
4
votes
2 answers

Binding ListBox with a model in MVC3

My model is public class SiteConfig { public SiteConfig() { } public int IdSiteConfig { get; set; } public string Name { get; set; } public byte[] SiteLogo { get; set; } public string Brands { get; set; } public…
3
votes
2 answers

How to seperate MVC project to several smaller MVC projects

I have an MVC 3 app that has some core functionality (most important is autorisation) but mainly serves as a portal to different areas or modules. I want to organize thit to different modules that with minor changes also can be deployed as their own…
cfs
  • 1,304
  • 12
  • 30
3
votes
2 answers

ASP.Net MVC 4 - Multiple types were found that match the controller named 'Home'.

Just created a new MVC 4 project and copied over some areas from an MVC 3 project. I have double checked all my web.configs and arearegistration.cs. My configs all point to the correct versions of razor and MVC and my routes.MapRoute signature…
JBeckton
  • 7,095
  • 13
  • 51
  • 71