Questions tagged [asp.net-mvc-3-areas]

ASP.NET MVC and its related flavors since 2007 by Microsoft. It has come up MVC4 and it's still evolving. It allows to build applications based on Model View and Controller. It can integrate with View Engines such as Razor, Spark, etc.

  • JQuery Integeration, Fluiq Integeration
  • MVC Challenges in integration
  • View Engines
  • MVC related Patterns
163 questions
102
votes
16 answers

A route named "x" is already in the route collection. Route names must be unique. Exception with ASP.NET MVC 3

I'm doing an ASP.NET MVC 3 web service and I keep getting this exception intermittently. Stack trace: Server Error in '/' Application. A route named 'ListTables' is already in the route collection. Route names must be unique. Parameter name:…
Rn222
  • 2,167
  • 2
  • 20
  • 36
28
votes
5 answers

mvc3 - using partial views in a different area

I have two questions regarding partial views... When to use Partial views vs @helper methods, i have used both interchangeably and would like to get more consistent in their usage. What do you guys do? How do you reference a partial view from…
MoXplod
  • 3,813
  • 6
  • 36
  • 46
14
votes
2 answers

MVC Areas for enterprise - good or bad?

Within a single project solution introducing Areas when you have a lot of controllers does improve separation and allows modules to easily be copied in or out of the solution. However in a large enterprise solution I would favour splitting the logic…
13
votes
1 answer

ASP.NET MVC 3 Areas and multiple authentication in web.config

I have been attempting to follow this blog to get Areas working: http://mstechkb.blogspot.com/2010/10/areas-in-aspnet-mvc-20.html In the blog post, it identifies the ability to have authentication set per Area, e.g.:
eyesnz
  • 2,698
  • 2
  • 16
  • 27
11
votes
9 answers

MVC 3 does not look for views under Areas

I'm using multiple areas in MVC 3 and I'm having problems with my views not being found. The routing seems to pick up my controllers correctly (all the actions are executing without any problems), but when I return a view MVC simply doesnt find…
Jaco Pretorius
  • 24,380
  • 11
  • 62
  • 94
11
votes
6 answers

How to set the textbox border color red when validation fails

I have got a task to set red color border for text box when the validation fails in .net mvc 4. BExtensionMethods.cs public static string GetTextBoxColor(this ModelStateDictionary ModelState) { string textBoxColor = string.Empty; …
Nithin Viswanathan
  • 3,245
  • 7
  • 39
  • 84
10
votes
1 answer

MVC 3 Won't Serve Content files from Areas subfolder

I have an MVC3 application with a couple of areas and a portable area as well (using MVCContrib) Normally, I keep all my content files under ~/Content and my scripts under ~/Scripts. However, I am building a fairly complex webclient to another…
Vassi
  • 780
  • 5
  • 14
7
votes
1 answer

Get Area name in Views on render time at ASP.NET MVC3 Razor

I use ViewContext.RouteData.Values["Controller"] to get controller name or ViewContext.RouteData.Values["action"] to get action name in views(actually in _Layout), but for area this ViewContext.RouteData.Values["Area"] not worked. What is your…
Saeid
  • 13,224
  • 32
  • 107
  • 173
7
votes
4 answers

pass model from one action to another action in same controller

I am trying to pass my model List< Models.Statement > statementList from one action to another but i am receiving null value in the 2nd controller. Please suggest what is wrong here. Even tried with: return RedirectToAction("WriteInTemplate", new {…
6
votes
1 answer

How to reuse Areas, Controllers, Views, Models, Routes in multiple apps or websites

I have a test solution which only has one area called Admin. I would like to reuse Admin across a number of other web applications. I have a web application setup in IIS, I have then added a virtual application, /Admin coming from Areas\Admin. When…
5
votes
1 answer

Developing/deploying MVC areas independently

We currently have 2 MVC web applications running completely independently of each other. The aim is to tie these 2 sites together in some sort of Intranet with shared authorisation etc. and some sort of home page linking to each. So far we have…
SeeNoWeevil
  • 2,549
  • 4
  • 26
  • 39
5
votes
1 answer

Different authentication mode for different areas

I have two portions of a website I am working on: one that uses normal forms authentication and another that uses an HMAC-based authentication. The forms based one works just as normal (except using a custom membership provider). The most…
Los Frijoles
  • 4,771
  • 5
  • 30
  • 49
4
votes
1 answer

HighCharts -- MVC 3 Database

I am working with DotNet.Highcharts in Visual Studio 2010. I am creating a MVC 3 Web Application. I am able to get HighCharts working by statically assigning the data. I would like to be able to send the data from a database to HighCharts for…
Linger
  • 14,942
  • 23
  • 52
  • 79
4
votes
3 answers

ASP NET MVC Area routing/multiple routes issue in VB

I'm pretty inexperienced with .net and have just started learning MVC. I've hit an issue concerning multiple controllers being found: "Multiple types were found that match the controller named 'reviews'. This can happen if the route that services…
Ian
  • 99
  • 3
  • 9
4
votes
1 answer

How to logout When a user closes the Web Application without loggin out

I have created Asp.net MVC4 Web application. In which, when a user logs in and do some browsing and then close the application from browser without logging out,then previously logged user is not logged out and When application is restarted then…
Yogesh
  • 3,044
  • 8
  • 33
  • 60
1
2 3
10 11