Hi,
Lets compare MVC 2 to a MVC 3 view, a basic one:
MVC 2:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PhotoRA.Web.ViewModels.StoreBrowseByEventViewModel>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>Browse Photo's</h2> <ul> <%foreach (var photo in Model.Photos) {%> <li><a href="<%: Url.Action("Details","Store", new {photoId = photo.PhotoId} ) %>"> <img src="<%:photo.Photo_Url %>" /> </a></li> <%}%> </ul> </asp:Content>
MVC3:
@model PhotoRA.Web.ViewModels.StoreBrowseByEventViewModel <h2>Browse Photo's</h2> <ul> @foreach (var photo in Model.Photos) { <li><a href="@Url.Action("Details", "Store", new {photoId = photo.PhotoId})"><img src="@photo.Photo_Url" /></a></li> } </ul>
Pretty Clean….
There is also a @helper for HTML helpers and loads of other stuff such as layout defaults and better IoC/DI support.