Questions tagged [asp.net-mvc]

The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern.

The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern. Based on ASP.NET, it allows software developers to build a Web application as a composition of three roles: Model, View and Controller.

A model represents the state of a particular aspect of the application. Frequently, a model maps to a database table with the entries in the table representing the state of the application. A controller handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that.

Also check out Nuget to use MvcScaffold to quickly build boiler plate code from POCO classes.

The latest stable version - MVC 3 - is available from the Microsoft Download Center website.

Latest announcements from Microsoft usually come from Scott Guthrie's blog. Other notable blogs relating to MVC include Phil Haack, Scott Hanselman, and Brad Wilson.

557 questions
50
votes
1 answer

Is FormsAuthentication obsolete?

I am creating a website using ASP.NET MVC 5. Has Microsoft release any technology to replace FormsAuthentication or do they still recommended authenticating the user using FormsAuthentication for MVC 5? UPDATE Jan 2020: It's been almost 5 five…
sean717
  • 677
12
votes
5 answers

Going back to ASP.Net Webforms from ASP.Net MVC. Recommend patterns/architectures?

To many of you this will sound like a ridiculous question, but I am asking because I have little to no experience with ASP.Net Webforms - I went straight to ASP.Net MVC. I am now working on a project where we are limited to .Net 2.0 and Visual…
jlnorsworthy
  • 1,266
5
votes
1 answer

Two MVC projects(API and Web), should ViewModel be in a common library or in each project?

I'm creating a .NET MVC solution that will have two web projects, one for API and for Web. Some models, such as customer, will be the same between the two projects. Is it best to have them kept in a common web library and referenced from the two web…
RJP
  • 251
4
votes
3 answers

Is ASP.NET MVC slow as compared to traditional approach?

I create three folders in the Project Explorer of any IDE that I use. I name them: App Layer, Business Layer and Data Layer. The App Layer holds all the UI stuff, the Business Layer holds all the classes dealing with business logic and the Data…
RPK
  • 4,378
3
votes
3 answers

Does a method to check the file type being uploaded belong in the controller?

If I create a controller that has a method ActionResult UploadFile(HttpPostedFileBase file) Where is the best place to add the code that will verify that this is a good and useable file? The reason I ask, is I will have to do more checking than…
MVCylon
  • 597
3
votes
2 answers

What are my options for exposing customization settings to the admin user?

I'm writing a blog system as a learning exercise and I would like to allow the admin (or blog owner) to select/change some custom options based on features that I choose to expose to them such as: change blog name (string) select layout…
3
votes
1 answer

Why did the Microsoft developers did not put T4MVC (or its working) in the core MVC?

What T4MVC does makes complete sense to us. It converts the simple string input into strongly typed input, which eases things for the developer. Like this - return View("foo"); to return View(Views.foo); // better (T4MVC) What could be a reason…
3
votes
1 answer

ASP.NET MVC Portable Areas - Can they communicate and be used as a plugin-like architecture?

I'll get straight to the point: I was wondering if there is a common pattern to use portable areas as a components of a plugin-like architecture. Example: We've got 3 plugins (portable areas) packaged and distributed via NuGet feed. Each of them is…
Beton
  • 33
2
votes
1 answer

Dynamic Permissions for roles in ASP.NET MVC

We have been developing a web application in ASP.NET MVC. We have scenarios where many actions on web page are dependent upon role of a specific user. For example a memo page has actions of edit, forward, approve, flag etc. These actions are granted…
2
votes
1 answer

Where to put methods in a .NET Core MVC Web app?

So I've gone through a few tutorials on writing .NET Core MVC Web apps. I think I've understood the flow from routing a request to the controller (with the EF-dbcontext injected into it) manipulating the dbSet model and onward to the view returning…
2
votes
1 answer

Is it good practise to access methods of one controller from another in MVC?

I have some methods defined in a controller which most of them returns JsonResult, and some returns PartialViews. So I have two questions, 1) Is it a good practice to access those methods that return JsonResult from other controllers? 2) Is it a…
Shanid
  • 177
  • 1
  • 6
2
votes
2 answers

Is it wrong to make any form of business decision in a Controller?

I'm building a prototype web application using ASP.NET MVC 5. Part of the application is the display of a grid of records, each of which has a button action to 'Archive' that record. Another page displays the archived records. A WCF service provides…
user153101
2
votes
1 answer

What benefits can I get upgrading my ASP.NET (Webform) + DAL(EF) + Repository + BLL structure to MVC?

I'm in the process of defining an approach that may best fit our needs for a big web application development. For now, I'm thinking going with an ASP.NET Architecture with a DAL using Entity Framework, a Repository concept to not access DAL…
Etienne
  • 123
1
vote
1 answer

Should I use Adaptor, Facade, Abstract Factory or Factory pattern to refactor God controllers

Our system was initially created around the client's ordering logic which is received by an API. This was allowed by the previous I.T. dept. However over time (after growth) many different clients with differing systems send their order's to our API…
and
  • 31
1
vote
0 answers

Can I do a POST AJAX to an MVC Controller or should I use Web API?

The page is loaded as a normal MVC page. The ajax is so the user can add items to their model without having to reload the page. Right now there is no Web API in the project. I don't want to add it unless it makes sense but I'm worried that using…
1
2