Difference between MVC 2 and MVC 3 in ASP.NET


Difference between MVC 2 and MVC 3 in ASP.NET





S.No
MVC 2
MVC 3
1
View Engines:
MVC 2 uses only Web Forms view engine (.aspx).
View Engines:
The view engines used in the ASP.NET MVC 3 Framework are the Razor View Engine (.cshtml or .vbhtml) and the Web Forms view engine (.aspx).
2
Chart, WebGrid, WebImage, WebMail Controls:
Not Available
Chart, WebGrid, WebImage, WebMail Controls:
Available
3
Objects available for sharing data between View and Controller:
TempData, ViewData
Objects available for sharing data between View and Controller:
TempData, ViewData ,ViewBag
4
Web Forms view engine syntax:
<%=Html code %>
Razor View Engine syntax:
@Html code
5
Support for jQuery:
Good
Support for jQuery:
Better
6
Support for Dependency Injection:
Good
Support for Dependency Injection:
Better
7
Support of Layouts:
Only Master Page (.master)
Support of Layouts:
Both Master Page (.master) and Layout Page (_Layout.cshtml)

Comments