Put Your Views (and Pages) On a Diet using web.config
The default view engine and Pages is that there’s all this extra cruft in there with the whole page directive and stuff. But it turns out that you can get rid of a lot of it. Credit goes to David Ebbo, the oracle of all hidden gems within the inner workings of ASP.NET.
First, let me show you what the before and after of our default Index view.
Before
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server"> Home Page </asp:Content> <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server"> <h2><%= Html.Encode(ViewData["Message"]) %></h2> <p> To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>. </p> </asp:Content>After
<asp:Content ContentPlaceHolderID="TitleContent" runat="server"> Home Page </asp:Content> <asp:Content ContentPlaceHolderID="MainContent" runat="server"> <h2><%= Html.Encode(ViewData["Message"]) %></h2> <p> To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>. </p> </asp:Content>
For more goto Put Your Views (and Pages) On a Diet

[...] to VotePut Your Views (and Pages) On a Diet using web.config (8/18/2009)Tuesday, August 18, 2009 from vincenthomedev.wordpress.com…p> To learn more about ASP.NET MVC [...]
Pingback by ASP.NET MVC Archived Blog Posts, Page 1 | August 23, 2009 |