ASP.NET MVC

Note: Source code, roadmaps and issue lists for upcoming releases of ASP.NET MVC 4, Web API and Web Pages 2 are available at http://aspnetwebstack.codeplex.com. This page will be retired once ASP.NET MVC 4 has shipped.

ASP.NET MVC is a free, fully supported Microsoft framework for developing great web applications using the Model-View-Controller pattern. It provides total control over your HTML and URLs, enables rich Ajax integration, and facilitates test driven development.

To find out more information about ASP.NET MVC, visit the following resources:

ASP.NET MVC 4 Released!

ASP.NET MVC 4 is now available! To find out more about the release, visit our ASP.NET MVC 4 information page.

Installation and Help

For help and to discuss ASP.NET MVC 4, visit the ASP.NET MVC forum.

ASP.NET MVC 3 RTM Released!

We've recently released RTM of ASP.NET MVC 3.

To learn about the new features introduced in ASP.NET MVC 3, visit the What's new in ASP.NET MVC 3 page and be sure to read the release notes.

Roadmap

The ASP.NET team is hard at work on the next version of ASP.NET MVC. To find out what’s coming next, visit the roadmap.

How to Provide Feedback

Because we highly value your input on this release version, please do submit feedback. There are two primary means for providing feedback:

  1. The ASP.NET MVC Forum on the ASP.NET Forums site allows you to engage in discussions with other customers and with the ASP.NET MVC product team. This is a great place to ask questions, post comments, and learn more about using ASP.NET MVC.
  2. The Issue Tracker tab on this site allows you to file bugs to the product team for consideration. The Issue Tracker is voting-based, so bugs with the most votes are given priority. (However, the product team will consider each issue individually, and more votes does not necessarily guarantee acceptance.)

Tip: Please use "Issue" type for logging bugs and "Feature" type for logging new feature suggestions.

Unit Test Integration

The ASP.NET MVC Project template (which we'll upload to this project very soon) provides a unit test dialog which allows you to select a unit test framework from a drop down. We are working closely with unit test framework providers to intergrate their frameworks into that drop down. The following is a list of those projects which have installers that integrate with ASP.NET MVC. These projects are run by others in the community, not the ASP.NET team.

Other Interesting Projects:

  • T4MVC: a T4 Template that generates strongly typed helpers for ASP.NET MVC
  • MVCContrib: A Codeplex project to add functionality to ASP.NET MVC. This project is run by others in the community, not the ASP.NET team.

Last edited Oct 9, 2012 at 10:08 PM by danroth27, version 61

Comments

chikawem Oct 26, 2013 at 10:48 AM 
hi please could anyone tell me how to upload an asp.net project into Codeplex

aminpooja Feb 27, 2012 at 6:32 AM 
hi, i'm new to MVC and currently doing the NerdDinner tutorial using mvc2 and vs2010. am at the Integrating AJAX map topic but when i run my application the map doesn't get displayed....plz help

chester89 Dec 8, 2011 at 12:14 PM 
can somebody please tell me, is Dynamic Data available for MVC? I think I saw a preview or beta around two years ago, but I can't find it now

gljivar Aug 25, 2011 at 1:20 PM 
I would like to suggest making controller method's RedirectToAction access modifier from protected internal to public.
Because then we could use lambda expressions to eliminate string names of methods when redirecting in controller.
It is described in this article by Patrick Steele for Castle MonoRail:
http://visualstudiomagazine.com/Articles/2011/04/01/pccsp_Expression-Trees.aspx?Page=2

For now I have put extension code into base controller but I think it would be better to put it into extension method.

Davimf Aug 7, 2011 at 8:07 PM 
I would like to suggest marking GetContainerUpdateScriptInternal from WebGrid as virtual to allow
people to use other scripts, and also the creation of another virtual methods to give more control over the html
generated enabling more expansibility and improving the quality of the framework

Thanks

ADubb Jun 6, 2011 at 4:24 PM 
Could you guys please make the controller cache publicly available at runtime? I can't tell you how many times I've seen people right code to find all controllers at runtime to add some functionality or test a new action filter. You can even see it in this NServiceBus blog post (http://www.make-awesome.com/2011/02/injecting-nservicebus-into-asp-net-mvc-3/) about dependency injection. I notice you guys have an internal ControllerCache class in the MVC source code. I'd like to think that's the one we need available. Could this be made standard in a future release please?

koistya Apr 28, 2011 at 1:59 PM 
Quote: "Tip: Please use "Issue" type for logging bugs and "Feature" type for logging new feature suggestions."

But.. is there a way to specify issue type if you're not the project's member?

liammclennan Feb 23, 2011 at 5:23 AM 
Now that v3 is released the documentation link in this page ('ASP.NET MVC Documentation on MSDN') is out of date. Probably should be http://msdn.microsoft.com/en-us/library/gg416514.aspx.

Assassyn Nov 28, 2010 at 11:03 PM 
I will be in favour for PDB file.

amecam Oct 31, 2010 at 10:43 AM 
It is a great pity that mvc3 is not compatible with vs2008. I know most .net devers are using vs2008.

mokeefe Aug 11, 2010 at 1:06 AM 
The 'ASP.NET MVC Documentation on MSDN' link is dead.

atworkasp Apr 22, 2010 at 1:12 PM 
Are there any documentation with regards to what features are included in the MVC 2 Futures package?

alexandrul Mar 11, 2010 at 6:39 PM 
Is it possible to use Mercurial instead of Subversion?

marquinhocb Aug 15, 2009 at 9:24 AM 
It would be great to see typesafe controls become part of the standard MVC package:
http://mvcimproved.codeplex.com/

mmtache Jun 29, 2009 at 10:19 PM 
Can you guys pleaaaaaaase make a dynamic help file for Visual Studio (2008)??

coldboyqn Jun 22, 2009 at 9:12 AM 
Hi guys, it would be nice if you just deploy the pdb file together with the release version of the System.Web.Mvc.dll. It would ease us alot in debugging mvc app.

marquinhocb Apr 23, 2009 at 11:13 PM 
I must say that I am a little dissapointed at the hate going around for using controls, and I am glad that you've added it to MVC Futures. Controls are great - as long as they don't have the ridiculous ViewState (or ControlState). For 2 great reasons - a page with controls is still valid XML, and the controls themselves are statically declared on the server side (as objects of the partial class).

Unfortunately, the latter advantage isn't currently used in MVC. What I mean is: these mvc controls could be used during data binding so that, instead of simply using the post values, they can be verified against declared controls to be validated as specifiable.

For example, if we have a user form with the following fields:

<mvc:TextBox name="FirstName" />
<mvc:TextBox name="LastName" />

When binding for the action:
class User
{
public string FirstName { get; set; }
public string LastName { get; set; }
public bool Administrator { get; set; }

}

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult EditUser (User u)
{
}

In the current MVC model, we must specify [Bind(Include="FirstName,LastName")] - is there any plan to, in the future, automatically build an include list based on the controls in the view?

stayboy Feb 12, 2009 at 12:06 PM 
I have been noticing an error with MVC RC. The MVC beta on accessing dbnull values wasnt throwing any exception. this is excellent because bindingsource on windows forms works likewise...i dont want to force values to the database when such fields should contain DBNULL. How do i solve this issue with the MVC Release candidate

thuang Jan 23, 2009 at 1:49 AM 
A ScriptManager-lite for MVC:
http://www.codeplex.com/MvcScriptManager

Looking forward to the one from ASP.NET team.

saravananim Dec 23, 2008 at 9:35 AM 
Hi,

I am using asp.net mvc preview 5 for one of my project. If i run my website from IIS 5 then it throws below error. But if i run using visual studio 2008 F5 then it works fine. If anyone faced this kind of problem please let me know how you fixed it

Server Error in '/' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 163: %>
Line 164: <%var Signin = Html.Resource("globalResources, Signin"); %>
Line 165: <%=Html.ActionLink(Signin.ToString(), "Login", "Account")%> |
Line 166: <%var register = Html.Resource("globalResources, register"); %>
Line 167: <%= Html.ActionLink(register.ToString(), "Register", "Account")%> |


Source File: d:\Technical Workshop\MuchSocial.com\Sourcecode\MuchSocial\MuchSocial\Views\Shared\UserSite.Master Line: 165

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
ASP.views_shared_usersite_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\Technical Workshop\MuchSocial.com\Sourcecode\MuchSocial\MuchSocial\Views\Shared\UserSite.Master:165
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +98
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +

Regards,
Saravanan

gerrylowry Nov 11, 2008 at 2:30 AM 
Unit Test Integration

Caveat Emptor: although "The ASP.NET MVC Project template ... provides a unit test dialog which allows you to select a unit test framework from a drop down", do not get your hopes too high if you're using VWD 2008 SP1. ASP.NET MVC does not work period with the orginal VWD 2008. Whether TDD and ASP.NET MVC can be easily used with VWD 2008 SP1 depends on a number of factors. Stay tuned.

BTW, the catch 22 here is that ASP.NET MVC is designed with enabling TDD in mind AFAIK.

Since novices getting their feet wet are likely to do so with the entry level product VWD 2008 SP1,
it would imo be a reasonable goal to have more harmony between ASP.NET MVC "official" Beta,
VWD 2008 SP1, and the family of TDD tools and utilities.

gerrylowry Oct 18, 2008 at 3:43 PM 
You can find more information about ASP.NET MVC (quickstarts, tutorials, screencasts etc...) on the ASP.NET MVC site site.
http://www.asp.net/mvc/ : crashing today (Saturday 2008-10-18, 10:39 EasternTime):
Server Error in '/' Application. ~~ Runtime Error

gerrylowry Oct 16, 2008 at 4:07 PM 
I see that Rob Conery, Scott Hanselman, and Phil Haack have written
"Professional ASP.NET 3.5 MVC, 400 pages, Wrox, 978-470-38461-9
as per page 48 of the Wiley Winter 2009 Technology catalogue.
The publication date is shown as "in stores" October 20.

Since currently ASP.NET MVC is still in BETA (Preview Release 5), has the
publication of the Microsoft team's book been delayed? If not, to which
preview release does the publication pertain?

In the past, Wrox has printed "Public Beta Release" on the front covers of books like
"Introducing .Net" (2000). The cover photograph in the Wiley Winter 2009 Technology
catalogue shows no such designation.

Please comment, Rob Conery, and/or Scott Hanselman, and/or Phil Haack.

Thank you.

corydeppen Sep 13, 2008 at 4:02 AM 
The ReadMe page for the latest version doesn't have any information about Preview 5 yet.

johnnyhalife Sep 1, 2008 at 4:41 AM 
Guys, I found that Juan Pablo Garcia from Southworks has published the MVC 5 templates (among others) that are compliant with StyleCop, if you are running this tool you might find his post useful, as I did:
http://blogs.southworks.net/jpgarcia/2008/09/01/visual-studio-2008-templates-compliant-with-microsoft-stylecop/