HTML and CSS Reference
In-Depth Information
Introducing ASP.NET MVC4
ASP.NET MVC is a framework based on .NET that was first released in 2009 and implements the MVC pattern.
The initial release used the same . aspx web forms syntax that was used in the traditional ASP.NET framework. In
2010, a new view engine called Razor was released, which is a more natural, HTML-like syntax. Also, instead of a
code-behind file, the Razor engine allows the code to be included in the markup file. MVC version 4.0 is included
with the Visual Studio 2012 release.
Like the traditional ASP.NET web forms I discussed in the previous chapter, MVC4 does not support many of
the new HTML5 tags out-of-the-box. However, the MVC framework is much more extensible, making it relatively
easy to add HTML5 support. In this chapter I will explain different techniques for extending the MVC framework
to incorporate the new HTML5 features. There are also several open-source extensions that you can install and I
will briefly demonstrate one of these as well.
Creating an ASP MVC Project
In this chapter you'll create an ASP.NET MVC project using the standard template in Visual Studio 2012. This
will create a web application that looks very similar to the one you created in Chapter 2 . Start Visual Studio 2012
(or the free version Visual Studio Express for Web). From the Web category, select the ASP.NET MVC 4 Web
Application template, enter Chapter 3 for the project name, and select an appropriate location as shown in
Figure 3-2 . Click the OK button to continue.
Figure 3-2. Selecting the MVC 4 project
You will be prompted to pick a template; select the Internet Application as shown in Figure 3-3 . This will
create a membership-based internet application just like the project in Chapter 2 . Make sure the Razor view
engine is selected.
 
Search WWH ::




Custom Search