<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Entries tagged with Razor</title>
    <atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Tags/razor/RSS"></atom:link>
    <itunes:summary></itunes:summary>
    <itunes:author>Microsoft</itunes:author>
    <itunes:subtitle></itunes:subtitle>
    <image>
      <url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
      <title>Channel 9 - Entries tagged with Razor</title>
      <link>http://channel9.msdn.com/Tags/razor</link>
    </image>
    <itunes:image href=""></itunes:image>
    <itunes:category text="Technology"></itunes:category>
    <description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
    <link>http://channel9.msdn.com/Tags/razor</link>
    <language>en</language>
    <pubDate>Sun, 19 May 2013 19:31:41 GMT</pubDate>
    <lastBuildDate>Sun, 19 May 2013 19:31:41 GMT</lastBuildDate>
    <generator>Rev9</generator>
    <c9:totalResults>15</c9:totalResults>
    <c9:pageCount>1</c9:pageCount>
    <c9:pageSize>25</c9:pageSize>
  <item>
      <title>Welcome to WebMatrix Event In Ireland - Cathal Connolly on DNN (Part 2 of 4)</title>
      <description><![CDATA[ <p>The Welcome to WebMatrix Event in Ireland Part&nbsp;2 of 4 features Josh Holmes and&nbsp;Cathal Connolly talking about WebMatrix, the new Razor syntax and DotNetNuke. Cathal demos how easy it is to work with a DNN site in WebMatrix and the new functionality in DNN&nbsp;that leverages the&nbsp;Razor.&nbsp;</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:1ddfd99d4a304e28931e9e8e00850c08">]]></description>
      <comments>http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Cathal-Connolly-on-DNN-Part-2-of-4</comments>
      <itunes:summary> The Welcome to WebMatrix Event in Ireland Part&amp;nbsp;2 of 4 features Josh Holmes and&amp;nbsp;Cathal Connolly talking about WebMatrix, the new Razor syntax and DotNetNuke. Cathal demos how easy it is to work with a DNN site in WebMatrix and the new functionality in DNN&amp;nbsp;that leverages the&amp;nbsp;Razor.&amp;nbsp; </itunes:summary>
      <itunes:duration>988</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Cathal-Connolly-on-DNN-Part-2-of-4</link>
      <pubDate>Mon, 21 Feb 2011 12:29:05 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Cathal-Connolly-on-DNN-Part-2-of-4</guid>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_2MB_ch9.wmv" expression="full" duration="988" fileSize="500381055" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_ch9.mp3" expression="full" duration="988" fileSize="7911106" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_ch9.wma" expression="full" duration="988" fileSize="8001627" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_ch9.wmv" expression="full" duration="988" fileSize="128075361" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_high_ch9.mp4" expression="full" duration="988" fileSize="334407876" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_low_ch9.mp4" expression="full" duration="988" fileSize="67521577" type="video/mp4" medium="video"></media:content>
        <media:content url="http://files.ch9.ms/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4.ism/manifest" expression="full" duration="988" fileSize="9098" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ak.channel9.msdn.com/ch9/0c08/1ddfd99d-4a30-4e28-931e-9e8e00850c08/WelcometoWebMatrixEventinIrelandCathalConnollyPart2of4_ch9.wmv" length="128075361" type="video/x-ms-wmv"></enclosure>
      <dc:creator>joshholmes</dc:creator>
      <itunes:author>joshholmes</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Cathal-Connolly-on-DNN-Part-2-of-4/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>DotNetNuke</category>
      <category>Razor</category>
      <category>WebMatrix</category>
      <category>Ireland</category>
    </item>
  <item>
      <title>Welcome to WebMatrix Event In Ireland - Josh Holmes (Part 1 of 4)</title>
      <description><![CDATA[ <p>The Welcome to WebMatrix Event in Ireland Part 1 of 4 features Josh Holmes talking about WebMatrix and the new Razor syntax. Additionally, he demos how easy it is to create a web site from scratch.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:2d37ef4ee7f94bf88cc69e8d014c222c">]]></description>
      <comments>http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Josh-Holmes-Part-1-of-4</comments>
      <itunes:summary> The Welcome to WebMatrix Event in Ireland Part 1 of 4 features Josh Holmes talking about WebMatrix and the new Razor syntax. Additionally, he demos how easy it is to create a web site from scratch. </itunes:summary>
      <itunes:duration>1571</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Josh-Holmes-Part-1-of-4</link>
      <pubDate>Mon, 21 Feb 2011 12:28:06 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Josh-Holmes-Part-1-of-4</guid>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_custom_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_2MB_ch9.wmv" expression="full" duration="1571" fileSize="684884004" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_ch9.mp3" expression="full" duration="1571" fileSize="12574478" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_ch9.wma" expression="full" duration="1571" fileSize="12714903" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_ch9.wmv" expression="full" duration="1571" fileSize="188862859" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_high_ch9.mp4" expression="full" duration="1571" fileSize="501036165" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_low_ch9.mp4" expression="full" duration="1571" fileSize="92034444" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_Zune_ch9.wmv" expression="full" duration="1571" fileSize="124110914" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://smooth.ch9.ms/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4.ism/manifest" expression="full" duration="1571" fileSize="8164" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ak.channel9.msdn.com/ch9/222C/2D37EF4E-E7F9-4BF8-8CC6-9E8D014C222C/WelcometoWebMatrixEventinIrelandJoshHolmesPart1of4_ch9.wmv" length="188862859" type="video/x-ms-wmv"></enclosure>
      <dc:creator>joshholmes</dc:creator>
      <itunes:author>joshholmes</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/joshholmes/Welcome-to-WebMatrix-Event-In-Ireland-Josh-Holmes-Part-1-of-4/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>MS Web Platform</category>
      <category>Razor</category>
      <category>WebMatrix</category>
      <category>Ireland</category>
    </item>
  <item>
      <title>Web Camps TV #10 - Update from Web Camp India</title>
      <description><![CDATA[ <p>Join <a href="http://www.twitter.com/jsenior">James Senior</a>, <a href="http://www.twitter.com/jongalloway">Jon Galloway</a>, and Harish Ranganathan from Hyderabad, India as they discuss the Web Camps running in India. During the Web Camp in Hyderabad, there were 300&#43; in-person attendees and over 10,000 watching online via live streaming!</p><p>At Web Camps, attendees get free hands-on training with ASP.NET MVC 3, Entity Framework Code-first, Razor, and much more, and Microsoft experts are available to answer attendee questions, too.</p><p>Don't worry if you missed the Web Camps in Hyderabad or Bangalore, there are two more events coming up in India—Chennai (December 1st) and Pune (December 3rd).&nbsp; </p><p>You can sign up for these events and more events&nbsp;around the world&nbsp;at <a href="http://www.webcamps.ms">www.webcamps.ms</a> </p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:70721d1d19c74b7b87089e3e0116d07f">]]></description>
      <comments>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-10-Update-from-Web-Camp-India</comments>
      <itunes:summary> Join James Senior, Jon Galloway, and Harish Ranganathan from Hyderabad, India as they discuss the Web Camps running in India. During the Web Camp in Hyderabad, there were 300&amp;#43; in-person attendees and over 10,000 watching online via live streaming! At Web Camps, attendees get free hands-on training with ASP.NET MVC 3, Entity Framework Code-first, Razor, and much more, and Microsoft experts are available to answer attendee questions, too. Don&#39;t worry if you missed the Web Camps in Hyderabad or Bangalore, there are two more events coming up in India—Chennai (December 1st) and Pune (December 3rd).&amp;nbsp;  You can sign up for these events and more events&amp;nbsp;around the world&amp;nbsp;at www.webcamps.ms  </itunes:summary>
      <itunes:duration>905</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-10-Update-from-Web-Camp-India</link>
      <pubDate>Wed, 01 Dec 2010 19:43:42 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-10-Update-from-Web-Camp-India</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_2MB_ch9.wmv" expression="full" duration="905" fileSize="118258929" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_ch9.mp3" expression="full" duration="905" fileSize="7248177" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_ch9.wma" expression="full" duration="905" fileSize="7331733" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_ch9.wmv" expression="full" duration="905" fileSize="178122861" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_high_ch9.mp4" expression="full" duration="905" fileSize="205199790" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_low_ch9.mp4" expression="full" duration="905" fileSize="84645212" type="video/mp4" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/d07f/70721d1d-19c7-4b7b-8708-9e3e0116d07f/webcampstvindia_ch9.wmv" length="178122861" type="video/x-ms-wmv"></enclosure>
      <dc:creator>James Senior</dc:creator>
      <itunes:author>James Senior</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-10-Update-from-Web-Camp-India/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>ASP.NET MVC 3</category>
      <category>Entity Framework</category>
      <category>MS Web Platform</category>
      <category>Razor</category>
      <category>Web Camps</category>
      <category>Web Camps</category>
    </item>
  <item>
      <title>WebMatrix - Die Razor Syntax</title>
      <description><![CDATA[ <p>WebMatrix kann zum erstellen von Webseiten die Razor Syntax benutzen. In diesem Screencast wird kurz erklärt wie man mit der Razor Syntax arbeitet und wie einfach sich in das HTML Markup .NET Code einbinden lässt.</p><p>Viel Spaß beim reinschauen,</p><p><a href="http://downtocode.net">Dariusz</a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:394427a628ed4d0fa41a9e2400860010">]]></description>
      <comments>http://channel9.msdn.com/Blogs/Dariusz/WebMatrix-Die-Razor-Syntax</comments>
      <itunes:summary> WebMatrix kann zum erstellen von Webseiten die Razor Syntax benutzen. In diesem Screencast wird kurz erkl&#228;rt wie man mit der Razor Syntax arbeitet und wie einfach sich in das HTML Markup .NET Code einbinden l&#228;sst. Viel Spa&#223; beim reinschauen, Dariusz </itunes:summary>
      <itunes:duration>565</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/Dariusz/WebMatrix-Die-Razor-Syntax</link>
      <pubDate>Thu, 04 Nov 2010 08:39:01 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/Dariusz/WebMatrix-Die-Razor-Syntax</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_2MB_ch9.wmv" expression="full" duration="565" fileSize="1" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_2MB_ch9.wmv" expression="full" duration="565" fileSize="11228894" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_ch9.mp3" expression="full" duration="565" fileSize="4523468" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_ch9.mp4" expression="full" duration="565" fileSize="37582827" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_ch9.wma" expression="full" duration="565" fileSize="4577065" type="audio/x-ms-wma" medium="audio"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/0010/394427a6-28ed-4d0f-a41a-9e2400860010/webmatrixrazorsyntax_2MB_ch9.wmv" length="0" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Dariusz Parys</dc:creator>
      <itunes:author>Dariusz Parys</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/Dariusz/WebMatrix-Die-Razor-Syntax/RSS</wfw:commentRss>
      <category>de-de</category>
      <category>Razor</category>
      <category>WebMatrix</category>
    </item>
  <item>
      <title>The Full Stack, Part 1 - Building the Admin Site with ASP.NET MVC 3, NuGet and EF Code First</title>
      <description><![CDATA[ <p>Jesse Liberty and Jon Galloway are kicking off a new screencast series called The Full Stack. They're pair-programming, building out a full&nbsp;application from a server back-end down to Windows Phone, web, Silverlight, and wherever else the app-building process leads them. Join them for the ride!</p><p>In this inaugural episode, they dig right in with a server back-end using NuGet, ASP.NET MVC 3, Razor views, and Entity Framework Code-First.</p><p>&nbsp;</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:62dfe6100895421facd29e1a012be402">]]></description>
      <comments>http://channel9.msdn.com/Series/The-Full-Stack/The-Full-Stack-Part-1-Building-the-Admin-Site-with-ASPNET-MVC-3-NuPack-and-EF-Code-First</comments>
      <itunes:summary> Jesse Liberty and Jon Galloway are kicking off a new screencast series called The Full Stack. They&#39;re pair-programming, building out a full&amp;nbsp;application from a server back-end down to Windows Phone, web, Silverlight, and wherever else the app-building process leads them. Join them for the ride! In this inaugural episode, they dig right in with a server back-end using NuGet, ASP.NET MVC 3, Razor views, and Entity Framework Code-First. &amp;nbsp; </itunes:summary>
      <itunes:duration>2667</itunes:duration>
      <link>http://channel9.msdn.com/Series/The-Full-Stack/The-Full-Stack-Part-1-Building-the-Admin-Site-with-ASPNET-MVC-3-NuPack-and-EF-Code-First</link>
      <pubDate>Mon, 25 Oct 2010 21:43:04 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Series/The-Full-Stack/The-Full-Stack-Part-1-Building-the-Admin-Site-with-ASPNET-MVC-3-NuPack-and-EF-Code-First</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_2MB_ch9.wmv" expression="full" duration="2667" fileSize="78202587" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_ch9.mp3" expression="full" duration="2667" fileSize="21341822" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_ch9.mp4" expression="full" duration="2667" fileSize="185592833" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_ch9.wma" expression="full" duration="2667" fileSize="21579705" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_ch9.wmv" expression="full" duration="2667" fileSize="100437436" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/e402/62dfe610-0895-421f-acd2-9e1a012be402/TheFullStack1_ch9.wmv" length="100437436" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Jon Galloway, Jesse Liberty</dc:creator>
      <itunes:author>Jon Galloway, Jesse Liberty</itunes:author>
      <slash:comments>14</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Series/The-Full-Stack/The-Full-Stack-Part-1-Building-the-Admin-Site-with-ASPNET-MVC-3-NuPack-and-EF-Code-First/RSS</wfw:commentRss>
      <category>ASP.NET MVC 3</category>
      <category>Entity Framework 4</category>
      <category>Razor</category>
      <category>Windows Phone 7</category>
    </item>
  <item>
      <title>Web Camps TV #10 - WebMatrix Beta 2: Themes, Package Manager, NuPack, HTML 5 templates and more</title>
      <description><![CDATA[ <p>This week, <a href="http://www.twitter.com/turanuk">Jim Wang </a>from the <a href="http://ASP.NET">ASP.NET</a> team and <a href="http://www.twitter.com/jsenior">James Senior </a>talk about WebMatrix Beta 2 and take a look at some of the new things—the Theming helper and Facebook Social Plugins helpers—that make it easy to add functionality to your websites. Additionally, we take a look at the Package Manager included in WebMatrix, which makes it easy to download and use helpers and templates—in fact, any assets—when building your websites. The Package Manager uses the new <a href="http://nupack.codeplex.com">NuPack </a>package management features, which have recently been getting a ton of buzz on the <a href="http://twitter.com/#%21/search/nupack">Twitterverse</a>.&nbsp; </p><p>Handy Links:</p><ol><li><a href="http://www.microsoft.com/web/webmatrix">Download and try WebMatrix Beta 2</a></li><li><a href="http://www.webcamps.ms">Learn more about WebMatrix at a free Web Camps Training Event</a></li></ol> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:66d789d2e664452788549e1401821c5e">]]></description>
      <comments>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-10-WebMatrix-Beta-2-Themes-Package-Manager-NuPack-HTML-5-templates-and-more</comments>
      <itunes:summary> This week, Jim Wang from the ASP.NET team and James Senior talk about WebMatrix Beta 2 and take a look at some of the new things—the Theming helper and Facebook Social Plugins helpers—that make it easy to add functionality to your websites. Additionally, we take a look at the Package Manager included in WebMatrix, which makes it easy to download and use helpers and templates—in fact, any assets—when building your websites. The Package Manager uses the new NuPack package management features, which have recently been getting a ton of buzz on the Twitterverse.&amp;nbsp;  Handy Links: Download and try WebMatrix Beta 2Learn more about WebMatrix at a free Web Camps Training Event</itunes:summary>
      <itunes:duration>1204</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-10-WebMatrix-Beta-2-Themes-Package-Manager-NuPack-HTML-5-templates-and-more</link>
      <pubDate>Wed, 20 Oct 2010 16:54:41 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-10-WebMatrix-Beta-2-Themes-Package-Manager-NuPack-HTML-5-templates-and-more</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_2MB_ch9.wmv" expression="full" duration="1204" fileSize="327061463" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_ch9.mp3" expression="full" duration="1204" fileSize="9639773" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_ch9.mp4" expression="full" duration="1204" fileSize="134090585" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_ch9.wma" expression="full" duration="1204" fileSize="9752957" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_ch9.wmv" expression="full" duration="1204" fileSize="217884656" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/1c5e/66d789d2-e664-4527-8854-9e1401821c5e/webmatrixjimwang2_ch9.wmv" length="217884656" type="video/x-ms-wmv"></enclosure>
      <dc:creator>James Senior</dc:creator>
      <itunes:author>James Senior</itunes:author>
      <slash:comments>7</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-10-WebMatrix-Beta-2-Themes-Package-Manager-NuPack-HTML-5-templates-and-more/RSS</wfw:commentRss>
      <category>HTML 5</category>
      <category>Razor</category>
      <category>WebMatrix</category>
    </item>
  <item>
      <title>REMIX10: A Website&#39;s Life: From Sketch to Publishing</title>
      <description><![CDATA[ <p>Recording from <a href="http://www.remix10.be">REMIX10</a> in Belgium:</p><p><strong>A Website's Life: From Sketch to Publishing</strong><br><br>WebMatrix is a new, free, fully featured, easy to install web development tool that helps you build ASP.NET and PHP websites, perform validation, SEO optimization and one-click publishing. My favorite feature however is a new script syntax for ASP.NET called *Razor* which will help you creating dynamic websites incredibly easy. We will spend some time sketching/wireframing our website, doing visual design work in Expression Design and then into experiencing the rich development toolset in WebMatrix.<br><br>- Sketching and Designing with Expression Design<br>- Introducing WebMatrix<br>- Web App Gallery, SEO Optimization, Publishing<br>- ASP.NET Razor Syntax<br><br>Speaker: <strong>Arturo Toledo</strong></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:2b785170622f4c30a52b9e0100fd7c54">]]></description>
      <comments>http://channel9.msdn.com/Blogs/adebruyn/REMIX10-A-Websites-Life-From-Sketch-to-Publishing</comments>
      <itunes:summary> Recording from REMIX10 in Belgium: A Website&#39;s Life: From Sketch to PublishingWebMatrix is a new, free, fully featured, easy to install web development tool that helps you build ASP.NET and PHP websites, perform validation, SEO optimization and one-click publishing. My favorite feature however is a new script syntax for ASP.NET called *Razor* which will help you creating dynamic websites incredibly easy. We will spend some time sketching/wireframing our website, doing visual design work in Expression Design and then into experiencing the rich development toolset in WebMatrix.- Sketching and Designing with Expression Design- Introducing WebMatrix- Web App Gallery, SEO Optimization, Publishing- ASP.NET Razor SyntaxSpeaker: Arturo Toledo </itunes:summary>
      <itunes:duration>3821</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/adebruyn/REMIX10-A-Websites-Life-From-Sketch-to-Publishing</link>
      <pubDate>Sun, 17 Oct 2010 19:18:47 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/adebruyn/REMIX10-A-Websites-Life-From-Sketch-to-Publishing</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_2MB_ch9.wmv" expression="full" duration="3821" fileSize="1519796345" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_ch9.mp3" expression="full" duration="3821" fileSize="30570108" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_ch9.mp4" expression="full" duration="3821" fileSize="320361023" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_ch9.wma" expression="full" duration="3821" fileSize="30904121" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_ch9.wmv" expression="full" duration="3821" fileSize="506716357" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/7c54/2b785170-622f-4c30-a52b-9e0100fd7c54/remix10websiteslifetoledofull_ch9.wmv" length="506716357" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Anthony de Bruyn</dc:creator>
      <itunes:author>Anthony de Bruyn</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/adebruyn/REMIX10-A-Websites-Life-From-Sketch-to-Publishing/RSS</wfw:commentRss>
      <category>Arturo Toledo</category>
      <category>ASP.NET</category>
      <category>BeLux</category>
      <category>Expression Design</category>
      <category>Razor</category>
      <category>Web Application Gallery</category>
      <category>WebMatrix</category>
      <category>Arturo Toldeo</category>
      <category>Remix10</category>
    </item>
  <item>
      <title>REMIX10: [Intro] A Website&#39;s Life: From Sketch to Publishing</title>
      <description><![CDATA[ <p>Recording from <a href="http://www.remix10.be">REMIX10</a> in Belgium:</p><p><strong>Arturo Toledo</strong> introduces his session called <strong>A Website's Life: From Sketch to Publishing</strong>.</p><p><a href="http://channel9.msdn.com/Blogs/adebruyn/REMIX10-A-Websites-Life-From-Sketch-to-Publishing">Watch the full session recording.</a></p><p>&nbsp;</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:182bb87d6e6c498688d29e0100fe7bdc">]]></description>
      <comments>http://channel9.msdn.com/Blogs/adebruyn/REMIX10-Intro-A-Websites-Life-From-Sketch-to-Publishing</comments>
      <itunes:summary> Recording from REMIX10 in Belgium: Arturo Toledo introduces his session called A Website&#39;s Life: From Sketch to Publishing. Watch the full session recording. &amp;nbsp; </itunes:summary>
      <itunes:duration>306</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/adebruyn/REMIX10-Intro-A-Websites-Life-From-Sketch-to-Publishing</link>
      <pubDate>Tue, 12 Oct 2010 11:50:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/adebruyn/REMIX10-Intro-A-Websites-Life-From-Sketch-to-Publishing</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_2MB_ch9.wmv" expression="full" duration="306" fileSize="115991253" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_ch9.mp3" expression="full" duration="306" fileSize="2451920" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_ch9.mp4" expression="full" duration="306" fileSize="30648645" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_ch9.wma" expression="full" duration="306" fileSize="2483277" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_ch9.wmv" expression="full" duration="306" fileSize="47623267" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/7bdc/182bb87d-6e6c-4986-88d2-9e0100fe7bdc/remix10websiteslifesketchtoledo_ch9.wmv" length="47623267" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Anthony de Bruyn</dc:creator>
      <itunes:author>Anthony de Bruyn</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/adebruyn/REMIX10-Intro-A-Websites-Life-From-Sketch-to-Publishing/RSS</wfw:commentRss>
      <category>Arturo Toledo</category>
      <category>BeLux</category>
      <category>Expression Design</category>
      <category>Razor</category>
      <category>WebMatrix</category>
      <category>Arturo Toldeo</category>
      <category>Remix10</category>
    </item>
  <item>
      <title>Web Camps TV #7 - WebMatrix Beta 2 Launches Today!</title>
      <description><![CDATA[ <p>Join <a href="http://www.twitter.com/jsenior">James Senior </a>as he talks to Scott Hunter and <a href="http://www.twitter.com/humancompiler">Erik Porter </a>from the ASP.NET team about the new features that are in the new releases of WebMatrix and ASP.NET Web Pages.&nbsp; WebMatrix provides everything you need to easily build, customize and deploy&nbsp;websites from scratch or by using&nbsp;open source applications like Joomla, Umbraco, DotNetNuke, Kentico et. al.&nbsp; </p><p>In this episode, the guys discuss some of the new features in WebMatrix Beta 2 including:</p><ul><li>Themes </li><li>New Templates </li><li>@Helper syntax </li><li>Full VB Support </li><li>NuPack Package Manager </li><li>and much more! </li></ul><p>Things to do:</p><ul><li><a href="http://www.microsoft.com/web/webmatrix">Download and install the new WebMatrix Beta</a></li><li><a href="http://www.jamessenior.com/2010/10/04/top-links-to-get-started-with-webmatrix/">Read James' post on the top resources for getting started with WebMatrix</a></li><li><a href="http://www.webcamps.ms">Get free training on WebMatrix at Web Camp</a></li></ul><p>&nbsp;</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:7cb7bc41485d4f91a6f09e05015d01d4">]]></description>
      <comments>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-7-WebMatrix-Beta-2-Launches-Today</comments>
      <itunes:summary> Join James Senior as he talks to Scott Hunter and Erik Porter from the ASP.NET team about the new features that are in the new releases of WebMatrix and ASP.NET Web Pages.&amp;nbsp; WebMatrix provides everything you need to easily build, customize and deploy&amp;nbsp;websites from scratch or by using&amp;nbsp;open source applications like Joomla, Umbraco, DotNetNuke, Kentico et. al.&amp;nbsp;  In this episode, the guys discuss some of the new features in WebMatrix Beta 2 including: Themes New Templates @Helper syntax Full VB Support NuPack Package Manager and much more! Things to do: Download and install the new WebMatrix BetaRead James&#39; post on the top resources for getting started with WebMatrixGet free training on WebMatrix at Web Camp&amp;nbsp; </itunes:summary>
      <itunes:duration>1851</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-7-WebMatrix-Beta-2-Launches-Today</link>
      <pubDate>Wed, 06 Oct 2010 15:03:02 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-7-WebMatrix-Beta-2-Launches-Today</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_2MB_ch9.wmv" expression="full" duration="1851" fileSize="132359275" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_ch9.mp3" expression="full" duration="1851" fileSize="14809904" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_ch9.mp4" expression="full" duration="1851" fileSize="205362309" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_ch9.wma" expression="full" duration="1851" fileSize="14979917" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_ch9.wmv" expression="full" duration="1851" fileSize="215168532" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/01d4/7cb7bc41-485d-4f91-a6f0-9e05015d01d4/webcampstvwebmatrixbeta2_ch9.wmv" length="215168532" type="video/x-ms-wmv"></enclosure>
      <dc:creator>James Senior</dc:creator>
      <itunes:author>James Senior</itunes:author>
      <slash:comments>15</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-7-WebMatrix-Beta-2-Launches-Today/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>Razor</category>
      <category>WebMatrix</category>
    </item>
  <item>
      <title>Developer Review - Four ASP.NET MVC View Engines</title>
      <description><![CDATA[
<h1><span><span><span>Introduction</span></span></span></h1>
<p class="MsoNormal">In this Developer Review, we evaluate four view engines available for use with ASP.NET MVC. First, we discuss the role a view engine plays in a website built with ASP.NET MVC, then we provide details about the four view engines in order
 to help you decide which one suits your needs. </p>
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td width="183" valign="top">
<p>Jason Haley</p>
<p><a href="http://jasonhaley.com/blog/" title="http://jasonhaley.com/blog/">http://jasonhaley.com/blog/</a></p>
</td>
<td width="455" valign="top">
<p><b>Source Code:</b> <a href="http://nerddinner.codeplex.com/">Download</a> in Branches/Playground directory</p>
<p><b>&nbsp;</b></p>
</td>
</tr>
</tbody>
</table>
<h1><span><span><span>What Does a View Engine Do?</span></span></span></h1>
<p class="MsoNormal">When we refer to a view engine in ASP.NET MVC, we are talking about three pieces of functionality:</p>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>A template locator/provider (implementation of IViewEngine)</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>A template that can render itself (implementation of IView)</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>A template engine that can parse and compile the view file syntax into executable code</p>
<p class="MsoNormal">Combining these three pieces, a view engine provides your controllers with the ability to translate views into Html.</p>
<h1><span><span><span>Why Use an Alternate View Engine?</span></span></span></h1>
<p class="MsoNormal">Though the view engine that ships with ASP.NET MVC has all the functionality you need to create views for just about any website project, it is also easily replaced.
</p>
<p class="MsoNormal">As with choosing a programming language in .Net, there are many reasons why you may choose one view engine over another:</p>
<p class="MsoNormal"><b>Syntax <br>
</b>ASP.NET MVC’s default view syntax is sometimes described as “tag soup.” This is due to the mix of all the&nbsp;
<span><span>&lt;%</span></span> … <span><span>%&gt;</span></span> tags along with the Html markup and causes some developers to feel like the view is messy.
</p>
<p class="MsoNormal"><b>Skillset/background <br>
</b>Many developers have already used the Castle Monorail MVC framework and are experiences with the view engines provided for that framework. Accordingly, it makes sense to leverage that experience by using a similar view engine in ASP.NET MVC.</p>
<p class="MsoNormal"><b>Productivity <br>
</b>For you, productivity may mean quick and easy to learn syntax or it may mean terse and less code. Depending on which is right for you, you may choose a different view engine.&nbsp;
</p>
<p class="MsoNormal"><b>Specialized Problem Domains <br>
</b>Some view engines use a DSL-like-language to represent the view, which may fit well within your environment.&nbsp;
</p>
<p class="MsoNormal"><b>Testability <br>
</b>View engin<a name="_GoBack"></a>es that don’t depend on the System.Web.UI.Page are easier to test than the default ASP.NET MVC view engine, which uses Page for a base class of its view implementation.</p>
<p class="MsoNormal"><b>Division of labor <br>
</b>If you have designers working on the views, or just want minimal logic in your views, you should choose a view engine that easily mixes with Html.</p>
<h1><span><span><span>Feature Comparison</span></span></span></h1>
<table cellpadding="0" cellspacing="0" border="1" class="auto-style1">
<tbody>
<tr>
<td colspan="5" width="741" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>View Language Features</span></span></b><span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Feature</span></span></b><span></span></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>WebFormViewEngine</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Spark</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>NHaml</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Razor</span></span></b></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Multi Line Code Blocks</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Inline Expression</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Local Functions</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Local Variables</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Global variables</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Conditional Output</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Support for Multiple Level Conditions</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Loops</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19"><span>
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</span></td>
<td width="134" valign="top" height="19"><span>
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</span></td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Html Encoding Shortcuts</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
<p align="center" class="MsoNormal"><span><span>(ASP.NET 4.0)</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Global Setting for Html Encoding</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span><span> </span><span>&nbsp;</span><strong><span>X</span></strong></span></p>
<p align="center" class="MsoNormal"><span><span>Limited Escape to prevent Html Encoding</span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">&nbsp;</p>
<table cellpadding="0" cellspacing="0" border="1" class="auto-style1">
<tbody>
<tr>
<td colspan="5" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>View Language Convenience Features</span></span></b><span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Feature</span></span></b><span></span></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>WebFormViewEngine</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Spark</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>NHaml</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Razor</span></span></b></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Global Namespace Imports</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Import Namespaces</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">&nbsp;</p>
<table cellpadding="0" cellspacing="0" border="1" class="auto-style1">
<tbody>
<tr>
<td colspan="5" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Master Page Features</span></span></b><span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Feature</span></span></b><span></span></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>WebFormViewEngine</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Spark</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>NHaml</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Razor</span></span></b></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Single View Master Page</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Global Master Page</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Content Placeholders</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Special Syntax for Partial Views</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">&nbsp;</p>
<table cellpadding="0" cellspacing="0" border="1" class="auto-style1">
<tbody>
<tr>
<td colspan="5" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Other Features</span></span></b><span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Feature</span></span></b><span></span></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>WebFormViewEngine</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Spark</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>NHaml</span></span></b></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><b><span><span>Razor</span></span></b></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Support for Editor Templates</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Visual Studio Integration</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span><strong><span>X</span></strong></span></p>
<p align="center" class="MsoNormal"><span><span>VS 2008/VS 2010 Built in</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
<p align="center" class="MsoNormal"><span><span>VS 2008/VS 2010Addins</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong><span>&nbsp;</span></span></p>
<p align="center" class="MsoNormal"><span><span>VS 2008 Addin</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span><strong><span>X</span></strong></span></p>
<p align="center" class="MsoNormal"><span><span>VS 2010 - More coming soon</span></span></p>
</td>
</tr>
<tr>
<td width="181" valign="top" height="19">
<p class="MsoNormal"><b><span><span>Supports MonoRail</span></span></b></p>
</td>
<td width="156" valign="top" height="19">
<p align="center" class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
<td width="134" valign="top" height="19">
<p align="center" class="MsoNormal"><span><strong><span>X</span></strong></span></p>
</td>
</tr>
</tbody>
</table>
<h1><span><span><span>Desired Features</span></span></span></h1>
<p class="MsoNormal">I created the following list of features after porting the views from the NerdDinner (<a href="http://nerddinner.codeplex.com/"><span>http://nerddinner.codeplex.com/</span></a>) example to Spark, NHaml, and Razor. The features mentioned
 are&nbsp; the different features I had to learn in order to convert the views to the different view engines. I’ve grouped the features into four areas: view language, view language convenience, master page features, and&nbsp;&nbsp; miscellaneous features.</p>
<h2><span><span><span>View Language Features</span></span></span></h2>
<h3><span><span><span>Multi Line Code Blocks</span></span></span></h3>
<p class="MsoNormal">Allows you to write multiple lines of code in your views. A related feature is local variables.</p>
<h3><span><span><span>Inline Expression</span></span></span></h3>
<p class="MsoNormal">An Inline Expression allows you to put a code expression inside static content in the view.</p>
<h3><span><span><span>Local Functions</span></span></span></h3>
<p class="MsoNormal">Local Functions provide the ability to create functions&nbsp; that can be called in multiple view locations.&nbsp; A related feature is Multi Line Code Blocks.</p>
<h3><span><span><span>Local Variables</span></span></span></h3>
<p class="MsoNormal">Provide a variable that is scoped to the view.</p>
<h3><span><span><span>Global Variables</span></span></span></h3>
<p class="MsoNormal">Allows you to provide variables available to all views in your site.</p>
<h3><span><span><span>Conditional Output</span></span></span></h3>
<p class="MsoNormal">Allows you to use if/else statements to control the output.</p>
<h3><span><span><span>Support for Multiple Level Conditionals</span></span></span></h3>
<p class="MsoNormal">Provides the ability to nest if/then statements.&nbsp; Conditional output is a related feature.</p>
<h3><span><span><span>Loops</span></span></span></h3>
<p class="MsoNormal">Allows you to use loop structures to provide repetitive data output.</p>
<h3><span><span><span>Html Encoding Shortcuts</span></span></span></h3>
<p class="MsoNormal">Provides shortcuts to ensuring returned output is HtmlEncoded.
</p>
<h3><span><span><span>Global Setting for Html Encoding</span></span></span></h3>
<p class="MsoNormal">Provides the ability to automatically HtmlEncode returned content.
</p>
<h2><span><span><span>View Language Convenience Features</span></span></span></h2>
<h3><span><span><span>Import Namespaces</span></span></span></h3>
<p class="MsoNormal">Allows you to import a namespace for a given view so you don’t need to type the fully qualified name of your objects..</p>
<h3><span><span><span>Global Namespace Imports</span></span></span></h3>
<p class="MsoNormal">Ability to set a namespace import for all views in one location.</p>
<h2><span><span><span>Master Page Features</span></span></span></h2>
<h3><span><span><span>Single View Master Page</span></span></span></h3>
<p class="MsoNormal">Provides the ability to set a master page for a single view.</p>
<h3><span><span><span>Global Master Page</span></span></span></h3>
<p class="MsoNormal">Ability to have a master page that is used for all views by default.</p>
<h3><span><span><span>Content Placeholders</span></span></span></h3>
<p class="MsoNormal">This feature has two parts. One part allows you to put placeholders in your master page. The second part allows you to specify the content to put in those placeholders. This means a view can optionally populate multiple content placeholders
 in the master page.</p>
<h3><span><span><span>Special Syntax for Partial Views</span></span></span></h3>
<p class="MsoNormal">Provides view language syntax to indicate where a partial view should be output. This is an alternative&nbsp; to the MVC’s framework Html helper extension (Html.RenderPartial).</p>
<h2><span><span><span>Other Features</span></span></span></h2>
<h3><span><span><span>Support for Editor Templates</span></span></span></h3>
<p class="MsoNormal">Editor Templates are an MVC 2 feature and allow you to declare what editor template you want loaded on your model classes. Editor Templates are a feature of the ASP.NET MVC framework and are not a feature of the view engine. Not all view
 engines, however, are able to parse the syntax used to make this work.</p>
<h3><span><span><span>Visual Studio Integration</span></span></span></h3>
<p class="MsoNormal">Visual Studio integration includes tooling for creating views, as well as IntelliSense and keyword coloring—things we take for granted most of the time.</p>
<h3><span><span><span>Support of Other MVC Frameworks</span></span></span></h3>
<p class="MsoNormal">Ability to use the same view engine with other .NET MVC Frameworks (like Castle’s MonoRail).</p>
<h1><span><span><span>View Engines Evaluated in this Developer Review</span></span></span></h1>
<h2 align="center"><span><span><span><span>ASP.NET MVC Default View Engine (WebFormViewEngine)</span></span></span></span></h2>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Website</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><a href="http://www.asp.net/mvc"><span><strong>http://www.asp.net/mvc</strong></span></a></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Download site</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><a href="http://www.asp.net/downloads"><span>http://www.asp.net/downloads</span></a></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>License</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>Microsoft Public License (MS-PL)</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Last Release</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>MVC 2.0 (Last Release), MVC 3 Preview 1</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Creator(s)</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>ASP.NET MVC Team at Microsoft</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Support Forum</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><a href="http://forums.asp.net/1146.aspx"><span>http://forums.asp.net/1146.aspx</span></a></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Languages Supported</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>C#, Visual Basic</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>ASP.NET MVC Versions</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>1.0, 2.0, 3 (Preview 1)</span></span></p>
</td>
</tr>
</tbody>
</table>
<h2 align="center"><span><span><span><span>Spark View Engine</span></span></span></span></h2>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Website</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><b><span><span>http://sparkviewengine.com/</span></span></b></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Download site</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>http://sparkviewengine.codeplex.com/</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>License</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>Apache License, Version 2.0</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Last Release</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>Spark v1.1 (March 11, 2010)</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Creator(s)</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>Louis DeJardin</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Support Forum</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><a href="http://groups.google.com/group/spark-dev?pli=1"><span>http://groups.google.com/group/spark-dev?pli=1</span></a></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Languages Supported</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>C#, Visual Basic, Iron Python, Iron Ruby</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>ASP.NET MVC Versions</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>1.0, 2.0 </span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">&nbsp;</p>
<h2 align="center"><span><span><span><span>NHaml View Engine</span></span></span></span></h2>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Website</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><b><span><span>http://code.google.com/p/nhaml/</span></span></b></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Download site</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>http://code.google.com/p/nhaml/downloads/list</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>License</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>MIT License</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Last Release</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>Nhaml-2.0-beta-4 (August, 20, 2010)</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Creator(s)</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>Andrew Peters</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Support Forum</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>http://groups.google.com/group/nhaml-users</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Languages Supported</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>C#, Visual Basic, Iron Ruby, Boo, F#</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>ASP.NET MVC Versions</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>1.0, 2.0</span></span></p>
</td>
</tr>
</tbody>
</table>
<h2 align="center"><span><span><span><span>Razor</span></span></span></span></h2>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Website</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><a href="http://www.asp.net/mvc"><span><strong>http://www.asp.net/mvc</strong></span></a><strong><span> and http://www.asp.net/WebMatrix</span></strong></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>License</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Last Release</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>Pre-releases: WebMatrix Beta and MVC 3 Preview 1</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Creator(s)</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>ASP.NET MVC Team at Microsoft</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Support Forum</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>http://forums.asp.net/1146.aspx</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>Languages Supported</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>C#, Visual Basic</span></span></p>
</td>
</tr>
<tr>
<td width="175" valign="top">
<p class="MsoNormal"><b><span><span>ASP.NET MVC Version</span></span></b></p>
</td>
<td width="463" valign="top">
<p class="MsoNormal"><span><span>3 (Preview 1)</span></span></p>
</td>
</tr>
</tbody>
</table>
<h1><span><span><span>ASP.NET MVC Default View Engine (aka WebFormViewEngine)</span></span></span></h1>
<p class="MsoNormal">If you’ve written any views in MVC, you’ve used the WebFormViewEngine view engine at one point or another. The syntax for writing views with this engine is the same syntax ASP.NET Web Forms uses for .aspx pages.</p>
<p class="MsoNormal">The default view engine used by ASP.NET MVC is powerful, mature and can do everything you need to do in a view – after all it stands on the shoulders of ASP.NET. Due to its IViewEngine implementation being in the class named WebFormViewEngine,
 the ASP.Net MVC default view engine is sometimes called the WebFormViewEngine. </p>
<p class="MsoNormal">The WebFormViewEngine is different than the other view engines in this review in that it extends ASP.NET’s Page class for its views. This allows the view engine to use a lot of the ASP.NET infrastructure to do the heavy lifting of parsing
 and compiling the view content.</p>
<p class="MsoNormal">The file extensions used are also borrowed from ASP.NET: .aspx for views, .ascx for partial views (and editor templates), and .master for master pages.&nbsp;
</p>
<p class="MsoNormal">The following is a screen shot of a view written with the default ASP.NET MVC view engine:</p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/6758.image_5F00_2.png"><img height="440" width="500" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/2548.image_5F00_thumb.png" alt="image" border="0" title="image"></a>
<br>
<strong>Screenshot 1.&nbsp; NerdDinners Dinner/Index Views using default view engine</strong></p>
<p class="MsoNormal">&nbsp;</p>
<h2><span><span><span>History</span></span></span></h2>
<p class="MsoNormal">The WebFormViewEngine’s history starts with ASP.NET MVC, which hit CTP in December 2007. Currently, it is the only view engine that ships with ASP.NET MVC.&nbsp; This view engine extends ASP.NET’s Page object to provide the view abstraction
 to MVC.&nbsp; This allows views to be written in the same web forms syntax used in ASP.NET web pages. The server-side escape syntax used by the view engine (<span><span>&lt;%</span></span> …
<span><span>%&gt;</span></span>) dates back to Classic ASP (that is, before .Net).&nbsp; </p>
<p class="MsoNormal">The base classes used by the WebFormViewEngine—ViewPage, ViewMasterPage, and ViewUserControl—are derived from the ASP.NET relatives Page, MasterPage, and UserControl, respectively, thus providing a mature rendering capability to the view.</p>
<h2><span><span><span>Key Features</span></span></span></h2>
<p class="MsoNormal">The WebFormViewEngine supports fourteen&nbsp; desired features.</p>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Feature</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><b><span><span>Notes</span></span></b></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Multi Line Code Blocks</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Inline Expression</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Local Functions</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Local Variables</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Conditional Output</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Multiple Level Conditionals</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Loops</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Html Encoding Shortcut</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Only when using ASP.NET 4.0</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Namespace Import</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Add in the web.config</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Import Namespace</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Single View Master Page</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>2 Options: Page Directive or Change in the Controller</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Content Placeholders</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Editor Templates</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Visual Studio Integration</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Best support of all view engines</span></span></p>
</td>
</tr>
</tbody>
</table>
<h2><span><span><span>Getting Started</span></span></span></h2>
<p class="MsoNormal">If you have ASP.NET MVC installed, you already have the WebFormViewEngine installed (if needed, download the ASP.NET MVC framework from
<a href="http://www.asp.net/downloads"><span>http://www.asp.net/downloads</span></a>).</p>
<h2><span><span><span>Dependencies</span></span></span></h2>
<p class="MsoNormal">The WebFormViewEngine is included in the System.Web.Mvc.dll, so the view engine is versioned with the ASP.NET MVC framework you reference. However, some of the features of the WebFormViewEngine are dependent on the version of the .Net framework/ASP.NET
 you are using. For example, if you are using .Net 3.5, to Html encode an output value you need to use syntax like the following:</p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/1464.image_5F00_4.png"><strong><img height="49" width="374" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/8306.image_5F00_thumb_5F00_1.png" alt="image" border="0" title="image"></strong></a>
<br>
<strong>Figure 1.&nbsp; ASP.NET Html Encode</strong> </p>
<p class="MsoNormal">If you are using .Net 4.0, you can use the new “Code Nugget” syntax to do the same thing:</p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/8802.image_5F00_6.png"><strong><img height="50" width="259" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/6266.image_5F00_thumb_5F00_2.png" alt="image" border="0" title="image"></strong></a>
<br>
<strong>Figure 2. ASP.NET 4.0 Html Encoding Syntax</strong></p>
<h2><span><span><span>Feature Syntax</span></span></span></h2>
<p class="MsoNormal">Since syntax is one of the main reasons you may want to use an alternative view engine, I have included some examples of the corresponding key features. This is not meant to be a language reference; rather, it is included to help you get
 a feel for how you may implement a view using the different view engines:</p>
<h3><span><span><span>Example of a Multi-Line Code Block</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td valign="top">
<pre><span><span>&lt;%</span></span><span><span>

<span>           </span></span><span><span><span>string</span></span><span> message = </span><span><span>&quot;The time is: {0}&quot;</span></span></span><span><span>;

           </span><span><span>string</span></span><span> timeString = </span><span><span>DateTime</span></span></span><span><span>.Now.ToShortTimeString();

           </span><span><span>string</span></span><span> output = </span><span><span>string</span></span></span><span><span>.Format(message, timeString);

  </span><span><span>%&gt;</span></span></span><span>

<span>&nbsp; The result from serverside code is: </span></span><span><span><span>&lt;%</span></span><span><span>=</span></span><span>output </span><span><span>%&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 1. Mult-Line Code Block - ASPX</i></p>
<h3><span><span><span>Example of Inline Expression</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span><span>&nbsp;</span></span></span></pre>
<pre><span><span><span>&lt;</span></span><span><span>script</span></span><span><span>&nbsp;</span><span><span>src</span></span><span><span>=&quot;</span></span><span><span>&lt;%</span></span><span><span>=</span></span><span>Url.Content(&quot;~/Scripts/MSAjaxHistoryBundle.js&quot;)</span><span><span>%&gt;</span></span><span><span>&quot;</span></span><span>&nbsp;</span></span></span></pre>
<pre><span><span><span>    </span><span><span>type</span></span><span><span>=&quot;text/javascript&quot;&gt;&lt;/</span></span><span><span>script</span></span><span><span>&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 2.&nbsp; Inline C# Code - ASPX</i></p>
<h3><span><span><span>Example of a Local Function</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span><span>&lt;</span></span><span><span>script</span></span></span><span><span><span>&nbsp;</span><span><span>runat</span></span><span><span>=&quot;server&quot;&gt;</span></span></span><span>

<span>  </span></span><span><span>    string</span></span><span><span> FunctionCallOnServerSide()

    {

           </span><span><span>return</span></span><span>&nbsp;</span><span><span>&quot;Hello World!&quot;</span></span></span><span><span>;

    }

  </span><span><span>&lt;/</span></span><span><span>script</span></span><span><span>&gt;</span></span></span><span>

<span>&nbsp; </span></span><span><span><span>&lt;</span></span><span><span>div</span></span><span><span>&gt;</span></span></span><span>

<span>    This is client side html

    Server Says: </span></span><span><span><span>&lt;%</span></span><span><span>=</span></span><span>FunctionCallOnServerSide() </span><span><span>%&gt;</span></span></span><span>

<span>    and more client side html

  </span></span><span><span><span>&lt;/</span></span><span><span>div</span></span><span><span>&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 3.&nbsp; Local Function - ASPX</i></p>
<h3><span><span><span>Example of a Local Variable</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span>&lt;%</span></span><span><span>

<span>           </span></span><span><span><span>string</span></span><span> message = </span><span><span>&quot;Hello World&quot;</span></span><span>;</span></span></span></pre>
<pre><span><span>%&gt;</span></span><span><span>

<span>&nbsp; The result message is: </span></span><span><span><span>&lt;%</span></span><span><span>= </span></span><span>message </span><span><span>%&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 4. Local Variable Usage - ASPX</i></p>
<h3><span><span><span>Example of Conditional Output</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span><span>&lt;</span></span><span><span>strong</span></span><span><span>&gt;</span></span></span><span><span><span>Who's Coming:</span><span><span>&lt;/</span></span><span><span>strong</span></span><span><span>&gt;</span></span></span><span>

<span>  </span></span><span><span><span>&lt;% </span></span><span><span>if</span></span><span> (Model.RSVPs.Count == 0){</span><span><span>%&gt;</span></span></span><span>

<span>    </span></span><span><span><span>&lt;</span></span><span><span>span</span></span><span><span>&gt;</span></span><span>No one has registered.</span><span><span>&lt;/</span></span><span><span>span</span></span><span><span>&gt;</span></span></span><span>

<span>  </span></span><span><span><span>&lt;%</span></span><span> } </span><span><span>%&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 5.&nbsp; Conditional Output - ASPX</i></p>
<h3><span><span><span>Example of Multi Level Condition Output</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span>&lt;%</span></span><span><span><span>&nbsp;</span><span><span>if</span></span><span> (Request.IsAuthenticated) { </span><span><span>%&gt;</span></span></span><span>

<span>  </span></span><span><span><span>&lt;%</span></span><span>&nbsp;</span><span><span>if</span></span><span> (Model.IsHostedBy(Context.User.Identity.Name)) { </span><span><span>%&gt;</span></span></span><span>

<span>    </span></span><span><span><span>&lt;</span></span><span><span>p</span></span><span><span>&gt;</span></span><span>You are the host for this event!</span><span><span>&lt;/</span></span><span><span>p</span></span><span><span>&gt;</span></span></span><span>

<span>&nbsp; </span></span><span><span><span>&lt;%</span></span><span> } </span><span><span>else</span></span><span> { (Model.IsUserRegistered(Context.User.Identity.Name)) { </span><span><span>%&gt;</span></span></span></span></pre>
<pre><span><span><span></span></span><span><span>&nbsp;&nbsp;&nbsp; </span><span><span>&lt;</span></span><span><span>p</span></span><span><span>&gt;</span></span><span>You are registered for this event!</span><span><span>&lt;/</span></span><span><span>p</span></span><span><span>&gt;</span></span><span>&nbsp;&nbsp; </span></span></span></pre>
<pre><span><span><span>&nbsp; </span><span><span>&lt;%</span></span><span> } </span><span><span>%&gt;</span></span></span><span><span>&nbsp;&nbsp; </span><span><span>&lt;%</span></span><span> } </span><span><span>else</span></span><span> { </span><span><span>%&gt;</span></span></span><span>

<span>&nbsp; </span></span><span><span><span>&lt;</span></span><span><span>strong</span></span><span><span>&gt;</span></span><span>RSVP for this event:</span><span><span>&lt;/</span></span><span><span>strong</span></span><span><span>&gt;</span></span></span><span>

<span>  </span></span><span><span><span>&lt;%</span></span><span> } </span><span><span>%&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 6.&nbsp; Multi-Level Condition Output - ASPX</i></p>
<h3><span><span><span>Example of For Loop</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span>&lt;%</span></span><span><span><span>&nbsp;</span><span><span>foreach</span></span><span> (</span><span><span>var</span></span><span> dinner </span><span><span>in</span></span><span> Model) { </span><span><span>%&gt;</span></span></span><span>
<span>  </span></span><span><span><span>&lt;</span></span><span><span>li</span></span><span><span>&gt;</span></span></span></span></pre>
<pre><span><span><span><span><span>    </span>&lt;%</span></span><span><span>:</span></span><span> Html.ActionLink(dinner.Title, </span><span><span>&quot;Details&quot;</span></span><span>, </span></span></span></pre>
<pre><span><span><span>           <span><span>new</span></span><span> { id=dinner.DinnerID }) </span><span><span>%&gt;</span></span></span></span><span>
<span>&nbsp; </span></span><span><span><span>&lt;/</span></span><span><span>li</span></span><span><span>&gt;</span></span></span></span></pre>
<pre><span><span><span></span></span><span><span><span>&lt;%</span></span><span> } </span><span><span>%&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 7.&nbsp; For Loop - ASPX</i></p>
<h3><span><span><span>Example of Html Encoding Shortcut</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;%</span></span><span><span>:</span></span><span><span> dinner.Address &#43;
</span><span><span>&quot; &quot;</span></span><span> &#43; dinner.Country </span><span><span>%&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">Code Sample 8.&nbsp; Html Encoding Shortcut</p>
<h3><span><span><span>Example of Global Namespace Import in Web.Config</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>pages</span></span><span><span>
</span></span><span><span>controlRenderingCompatibilityVersion</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>3.5</span></span><span>&quot;</span><span><span>
</span></span><span><span>clientIDMode</span></span><span><span>=</span></span><span>&quot;</span><span><span>AutoID</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>namespaces</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc.Ajax</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 9.&nbsp; Global Namespace Import - ASPX</i></p>
<h3><span><span><span>Example of Importing a Namespace in a View</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;%</span></span><span><span>@</span></span><span><span>
</span><span><span>Import</span></span><span> </span><span><span>Namespace</span></span><span><span>=”NerdDinner.Helpers&quot;</span></span><span>
</span><span><span>%&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 10. Namespace Import - ASPX</i></p>
<h3><span><span><span>Example of Setting Master Page in View’s Page Directive</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span><span>&lt;%</span></span><span><span>@</span></span><span><span>&nbsp;</span><span><span>Page</span></span><span>&nbsp;</span><span><span>Language</span></span><span><span>=&quot;C#&quot;</span></span><span>&nbsp;</span><span><span>MasterPageFile</span></span><span><span>=&quot;~/Views/Shared/Site.Master&quot;</span></span><span>&nbsp;</span></span></span></pre>
<pre><span><span><span>  </span><span><span>Inherits</span></span><span><span>=&quot;System.Web.Mvc.ViewPage&quot;</span></span><span>&nbsp;</span><span><span>%&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 11.&nbsp; Setting MasterPageFile attribute in Page Directive - ASPX</i></p>
<h3><span><span><span>Example of Changing Master Page in Controller:</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span>public</span></span><span><span><span>&nbsp;</span><span><span>ActionResult</span></span></span><span><span> About() {
 </span><span><span>  var</span></span></span><span><span> result = View();
   result.MasterName = </span><span><span>&quot;AlternateMaster&quot;</span></span></span><span><span>;&nbsp;&nbsp; </span><span><span>  </span></span></span></span></pre>
<pre><span><span><span><span>   return</span></span><span> result;
}</span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 12.&nbsp; Setting MasterName Property of a View - ASPX</i></p>
<h3><span><span><span>Example of Master Page with Content Placeholders</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span><span>&lt;</span></span><span><span>head</span></span></span><span><span><span>&nbsp;</span><span><span>id</span></span><span><span>=&quot;Head1&quot;</span></span><span>&nbsp;</span><span><span>runat</span></span><span><span>=&quot;server&quot;&gt;</span></span></span></span></pre>
<pre><span><span><span>   </span></span><span><span><span>&lt;</span></span><span><span>title</span></span><span><span>&gt;</span></span></span></span></pre>
<pre><span><span><span><span>      &lt;</span></span><span><span>asp</span></span><span><span>:</span></span><span><span>ContentPlaceHolder</span></span><span>&nbsp;</span><span><span>ID</span></span><span><span>=&quot;TitleContent&quot;</span></span><span>&nbsp;</span><span><span>runat</span></span><span><span>=&quot;server&quot;</span></span><span>&nbsp;</span><span><span>/&gt;</span></span></span></span></pre>
<pre><span><span><span><span>   &lt;/</span></span><span><span>title</span></span><span><span>&gt;</span></span></span></span></pre>
<pre><span><span><span><span>   &lt;</span></span><span><span>asp</span></span><span><span>:</span></span><span><span>ContentPlaceHolder</span></span><span><span> ID</span></span><span><span>=&quot;HeadContent&quot; </span></span><span><span>runat</span></span><span><span>=&quot;server&quot;</span></span><span>&nbsp;</span><span><span>/&gt;</span></span></span></span></pre>
<pre><span><span><span></span></span><span><span><span>&lt;/</span></span><span><span>head</span></span><span><span>&gt;</span></span><span>&nbsp;&nbsp;&nbsp; </span></span></span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 13.&nbsp; Master Page with ContentPlaceholders - ASPX</i></p>
<h3><span><span><span>Example of View with Multiple Content Elements</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<pre><span><span><span>&lt;</span></span><span><span>asp</span></span><span><span>:</span></span><span><span>Content</span></span></span><span><span><span>&nbsp;</span></span></span></pre>
<pre><span><span><span>   <span><span>ID</span></span><span><span>=&quot;TitleArea&quot;</span></span><span>&nbsp;</span></span></span></span></pre>
<pre><span><span><span>   <span><span>ContentPlaceHolderID</span></span><span><span>=&quot;TitleContent&quot;</span></span><span>&nbsp;</span></span></span></span></pre>
<pre><span><span><span>   <span><span>runat</span></span><span><span>=&quot;server&quot;&gt;</span></span></span></span><span>
<span>&nbsp;&nbsp;&nbsp;&nbsp; About
</span></span><span><span><span>&lt;/</span></span><span><span>asp</span></span><span><span>:</span></span><span><span>Content</span></span><span><span>&gt;</span></span></span></span></pre>
<pre><span><span><span></span></span><span><span><span>&lt;</span></span><span><span>asp</span></span><span><span>:</span></span><span><span>Content</span></span><span>&nbsp;</span></span></span></pre>
<pre><span><span><span>   <span><span>ID</span></span><span><span>=&quot;HeadArea&quot;</span></span><span>&nbsp;</span></span></span></span></pre>
<pre><span><span><span>   <span><span>ContentPlaceHolderID</span></span><span><span>=&quot;HeadContent&quot;</span></span><span>&nbsp;</span></span></span></span></pre>
<pre><span><span><span>   <span><span>runat</span></span><span><span>=&quot;server&quot;&gt;</span></span></span></span></span></pre>
<pre><span><span><span><span>   </span></span></span><span><span><span>&lt;</span></span><span><span>script</span></span><span>&nbsp;</span></span></span></pre>
<pre><span><span><span>     <span><span>src</span></span><span><span>=&quot;</span></span><span><span>&lt;%</span></span><span><span>=</span></span><span>Url.Content(&quot;~/Scripts/jquery-1.4.1.min.js&quot;)</span><span><span>%&gt;</span></span><span><span>&quot;</span></span><span>&nbsp;</span></span></span></span></pre>
<pre><span><span><span>     type</span></span><span><span>=&quot;text/javascript&quot;&gt;&lt;/</span></span><span><span>script</span></span><span><span>&gt;</span></span></span></pre>
<pre><span><span></span></span><span><span><span><span><span></span>&lt;/</span></span><span><span>asp</span></span><span><span>:</span></span><span><span>Content</span></span><span><span>&gt;</span></span></span></span></pre>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 14. View with Content Elements - ASPX</i></p>
<h2><span><span><span>Visual Studio Integration</span></span></span></h2>
<p class="MsoNormal">Being the first view engine for ASP.NET MVC also means that the WebFormViewEngine has an advantage over other view engines when it comes to Visual Studio tooling and support.&nbsp;&nbsp; Once you install ASP.NET MVC, you have the default view engine
 integrated into Visual Studio – which provides a lot of tooling for your views. </p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/3034.image_5F00_8.png"><strong><img height="441" width="447" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/5287.image_5F00_thumb_5F00_3.png" alt="image" border="0" title="image"></strong></a>
<br>
<strong>Figure 1.&nbsp; Add View Dialog</strong></p>
<p class="MsoNormal">The Visual Studio tooling provides an <b>Add View Dialog</b> (shown above) when you create a new view, which provides the following features:</p>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Ability to specify whether the view is a partial view or normal view</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Choice of the type of view model you want</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Option to choose a T4 template for generating the view content or just create an empty view</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Option to use a master page and set the content placeholder for the view’s content</p>
<h4><span><span><span><em>IntelliSense Support</em></span></span></span></h4>
<p class="MsoNormal">Visual Studio provides complete IntelliSense support for views using the WebFormViewEngine, including support for the directives used at the top of the page (page settings, namespace imports, etc.) and usage documentation as you type, as
 well as all other .aspx and .ascx productivity enhancements added by Visual Studio over the years, including ASP.NET MVC, HTML markup, and JavaScript Snippets (new in VS 2010).</p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/1464.image_5F00_10.png"><em><strong></strong></em></a><a></a><a></a><br>
<em><strong>Figure 2. Page Directive IntelliSense </strong></em><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/0407.image_5F00_10.png"><img height="214" width="348" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/7737.image_5F00_thumb_5F00_4.png" alt="image" border="0" title="image"></a></p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/2045.image_5F00_16.png"><em><strong></strong></em></a><a></a><a></a><br>
<em><strong>Figure 3. Usage Documentation IntelliSense</strong></em><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/2538.image_5F00_16.png"><img height="113" width="458" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/3122.image_5F00_thumb_5F00_7.png" alt="image" border="0" title="image"></a></p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/2047.image_5F00_14.png"><em><strong></strong></em></a><a></a><a></a><br>
<em><strong>Figure 4.&nbsp; ASP.NET MVC Snippet for Action Link Start</strong></em><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/5277.image_5F00_14.png"><img height="167" width="500" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/2626.image_5F00_thumb_5F00_6.png" alt="image" border="0" title="image"></a></p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/3034.image_5F00_18.png"><em><strong></strong></em></a><a></a><a></a><br>
<em><strong>Figure 5. ASP.NET MVC Snippet for Action Link Result</strong></em><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/7737.image_5F00_18.png"><img height="51" width="373" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/3531.image_5F00_thumb_5F00_8.png" alt="image" border="0" title="image"></a></p>
<h2><span><span><span>Getting Support</span></span></span></h2>
<p class="MsoNormal">The WebFormViewEngine is part of the ASP.NET MVC framework and is supported the same way as the framework. The primary support forum for the ASP.NET MVC framework can be found at:
<a href="http://forums.asp.net/1146.aspx"><span>http://forums.asp.net/1146.aspx</span></a></p>
<h3><span><span><span>ASP.Net Default View Engine Strengths</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>It is included with ASP.NET MVC</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>It is supported along with the ASP.NET MVC framework</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>It is easy to learn</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Web Form developers can utilize their web form development experience to get started with MVC views</p>
<h3><span><span><span>ASP.Net Default View Engine Weaknesses</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Hard to test due to a dependency on Page</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>The syntax can lead to views becoming “tag soup”</p>
<h1><span><span><span>Spark View Engine</span></span></span></h1>
<p class="MsoNormal">The Spark view engine was designed to mix the code into the flow of the html, which leads to nicer looking views without all the escape syntax that dominates the WebFormViewEngine’s syntax.</p>
<p class="MsoNormal">Spark has been around for more than two years now and has a lot of features you won’t find in the default view engine. Unlike the WebFormViewEngine, Spark has its own view class and doesn’t extend the ASP.NET Page class. Spark also works
 with both ASP.NET MVC and Castle MonoRail MVC Framework.</p>
<p class="MsoNormal">The Spark view engine differs from the other view engines because it mixes its language syntax in with the elements of your view. The language constructs exist mostly as elements and attributes. For example, there is an &lt;if&gt; element and
 a &lt;for&gt; element, and partial views can also be represented as an element.</p>
<p class="MsoNormal">The file extension used for views, partial views, and layouts (master pages) is .spark
</p>
<p class="MsoNormal">Below is a screen shot of a view written using the Spark view engine:</p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/0878.image_5F00_20.png"><strong></strong></a><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/0882.image_5F00_20.png"><img height="500" width="500" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/0878.image_5F00_thumb_5F00_9.png" alt="image" border="0" title="image"></a><a></a><a></a></p>
<p align="center" class="MsoNormal"><strong></strong></p>
<p align="center" class="MsoNormal"><strong>Screenshot 2.&nbsp; NerdDinners Dinner/Index View in Spark</strong></p>
<h2><span><span><span>History</span></span></span></h2>
<p class="MsoNormal">Louis DeJardin began developing the Spark view engine in May 2008, soon after reading a blog entry by Phil Haack (<a href="http://haacked.com/archive/2008/05/03/code-based-repeater-for-asp.net-mvc.aspx#67581"><span>Code Based Repeater for
 ASP.NET MVC</span></a>). Louis designed and wrote the view engine from ground up (it is not a port of another view engine or language) in order to build a view syntax able to seamlessly mix the code into the Html.</p>
<h2><span><span><span>Key Features</span></span></span></h2>
<p class="MsoNormal">Spark is the only view engine of the four that supports all of the features on my desired feature list.</p>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Feature</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><b><span><span>Notes</span></span></b></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Multi Line Code Blocks</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Inline Expression</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Local Functions</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Called ‘Macros’, limited to functions that return strings</span></span></p>
<p class="MsoNormal"><span><span>Also supports global functions.</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Local Variables</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Variables</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Conditional Output</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Multiple Level Conditionals</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Loops</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Html Encoding Shortcut</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Setting for Html Encoding</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Import Namespaces</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Namespace Imports</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Add in the web.config or _global.spark file</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Single View Master Page</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Master Page</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Content Placeholders</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Special Syntax for Partial Views</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>If partial view file begins with ‘_’ can use the name as an element in the view.
</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Editor Templates</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Visual Studio Integration</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Add-ins exist for VS 2008 and VS 2010</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Other MVC Frameworks</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">&nbsp;</p>
<h2><span><span><span>Getting Started</span></span></span></h2>
<p class="MsoNormal">Spark is available for download at <a href="http://sparkviewengine.codeplex.com/">
<span>http://sparkviewengine.codeplex.com/</span></a>. After you have downloaded and extracted the binaries, add Spark as a view engine in your ASP.NET MVC project by performing the following steps:</p>
<p class="MsoListParagraphCxSpFirst">1.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Set a reference to the Spark.dll and Spark.Web.Mvc.dll libraries included in the release download.</p>
<p class="MsoListParagraphCxSpLast">2.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Open the Global.asax.cs file and add a new SparkViewFactory to the ViewEngines.Engines collection:</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>void</span></span><span><span> Application_Start()</span></span></span></p>
<p class="MsoNormal"><span><span><span>{</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RegisterRoutes(</span><span><span>RouteTable</span></span><span>.Routes);</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span><span>ViewEngines</span></span><span>.Engines.Add(</span><span><span>new</span></span><span>
</span><span><span>SparkViewFactory</span></span><span>());</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph">3.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>In your web.config file, add a section to your configSections for the SparkSectionHandler as shown below:</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>configuration</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;</span></span><span><span>configSections</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>section</span></span><span><span>
</span></span><span><span>name</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>spark</span></span><span>&quot;</span><span><span>
</span></span><span><span>type</span></span><span><span>=</span></span><span>&quot;</span><span><span>Spark.Configuration.SparkSectionHandler, Spark</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph">4.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Add the &lt;spark&gt; section to your web.config file. I put mine just after the &lt;/connectionStrings&gt; element. Below is the configuration section I used to port the NerdDinner project to
 Spark.</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>spark</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>compilation</span></span><span><span>
</span></span><span><span>debug</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>defaultLanguage</span></span><span><span>=</span></span><span>&quot;</span><span><span>CSharp</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>pages</span></span><span><span>
</span></span><span><span>automaticEncoding</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span> &gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>namespaces</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Collections.Generic</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Linq</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc.Html</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span></span><span><span>namespaces</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;/</span></span><span><span>pages</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;/</span></span><span><span>spark</span></span><span><span>&gt;</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph">5.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Change the settings as necessary (<a href="http://sparkviewengine.com/documentation/configuring"><span>check the documentation
</span></a>for the options that apply to you). </p>
<h2><span><span><span>Dependencies</span></span></span></h2>
<p class="MsoNormal">For Spark to work as a view engine in your ASP.NET MVC project, you need references to the Spark.dll and Spark.Web.Mvc.dll</p>
<h2><span><span><span>Feature Syntax</span></span></span></h2>
<p class="MsoNormal">The following are examples for the key features listed above:</p>
<h3><span><span><span>Example Using the # Statement for Escaping Multiple Lines of Code</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string message = &quot;The time is: {0}&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string timeString = DateTime.Now.ToShortTimeString();</span></span></span></p>
<p class="MsoNormal"><span><span><span>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string output = string.Format(message, timeString);</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>The result from serverside code is: ${output}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 15. Using the # Statement to Escape Code -Spark</i></p>
<h3><span><span><span>Example Using ${ } for an Inline Expression </span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>script</span></span><span><span>
</span></span><span><span>src</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>${ Url.Content(</span></span><span>&quot;</span><span><span>~</span></span><span><span>/</span></span><span>Scripts/MSAjaxHistoryBundle.js&quot;) }&quot;
</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; type=&quot;text/javascript&quot;&gt;</span><span><span>&lt;/</span></span><span><span>script</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 16. Using Inline Escape -Spark</i></p>
<p class="MsoNormal">One drawback to using the ${} syntax is that it will fail if the expression returns null. In order to protect against the possibility of an expression returning null, you can use the $!{} expression.
</p>
<h3><span><span><span>Example Using !${} to Output an Expression that May Return Null</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>span</span></span><span><span>
</span></span><span><span>class</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>fn nickname</span></span><span>&quot;</span><span><span>&gt;</span></span><span>$!{ Model.RSVPs.FirstOrNull() }</span><span><span>&lt;/</span></span><span><span>span</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 17. Using Inline Escape When Expression Maybe Null -Spark</i></p>
<h3><span><span><span>Example of a Local Function (Macro) in Spark:</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>macro</span></span><span><span>
</span></span><span><span>name</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>FunctionCallOnServerSide</span></span><span>&quot;</span><span><span>
</span></span><span><span>message</span></span><span><span>=</span></span><span>&quot;</span><span><span>string</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>b</span></span><span><span>&gt;</span></span><span><span>${message}</span><span><span>&lt;/</span></span><span><span>b</span></span><span><span>&gt;&nbsp;&nbsp;&nbsp;
</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>macro</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>div</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This is client side html</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Server Says: ${ FunctionCallOnServerSide(&quot;OutputMessage&quot;) }</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and more client side html</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>div</span></span><span><span>&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 18. Declaring and Using a Macro -Spark</i></p>
<h3><span><span><span>Example of Creating and Using a Local Variable</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>var</span></span><span><span>
</span></span><span><span>RSVPs</span></span><span><span> = </span></span><span><span>&quot;</span><span><span>Model.RSVPs.Reverse()</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>${RSVPs.Count().ToString() }</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 19. Local Variable Usage -Spark</i></p>
<h3><span><span><span>Example of Creating and Using a Global Variable</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>global</span></span><span><span>
</span><span><span>version</span></span><span><span>=&quot;0.01F&quot;</span></span><span> </span>
<span><span>type</span></span><span><span>=&quot;float&quot;</span></span><span> </span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>${version &#43; 1}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 20. Global Variable Usage -Spark</i></p>
<h3><span><span><span>Example of Conditional Output - If/Else Element</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>strong</span></span><span><span>&gt;</span></span><span><span>Who's Coming:</span><span><span>&lt;/</span></span><span><span>strong</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>if</span></span><span><span>
</span></span><span><span>condition</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>Model.RSVPs.Count == 0</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>span</span></span><span><span>&gt;</span></span><span><span>No one has registered.</span><span><span>&lt;/</span></span><span><span>span</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>if</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>else</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; ... other markup here ...</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>else</span></span><span><span>&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 21. If/Else Element Usage-Spark</i></p>
<h3><span><span><span>Example of Conditional Output - if Attribute</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>strong</span></span><span><span>&gt;</span></span><span><span>Who's Coming:</span><span><span>&lt;/</span></span><span><span>strong</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>span if</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>Model.RSVPs.Count == 0</span></span><span>&quot;</span><span><span>&gt;</span></span><span>No one has registered.</span><span><span>&lt;/</span></span><span><span>span</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>else</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; ... other markup here ...</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>else</span></span><span><span>&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 22. If Attribute Usage -Spark</i></p>
<h3><span><span><span>Example of Multi Level Condition Output</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>if</span></span><span><span>
</span></span><span><span>condition</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>Request.IsAuthenticated</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;</span></span><span><span>if</span></span><span><span>
</span></span><span><span>condition</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>Model.IsHostedBy(Context.User.Identity.Name)</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>p</span></span><span><span>&gt;</span></span><span><span>You are the host for this event!</span><span><span>&lt;/</span></span><span><span>p</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;/</span></span><span><span>if</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;</span></span><span><span>else</span></span><span><span>
</span></span><span><span>if</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>Model.IsUserRegistered(Context.User.Identity.Name)</span></span><span>&quot;</span><span><span>&gt;
</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>p</span></span><span><span>&gt;</span></span><span><span>You are registered for this event!</span><span><span>&lt;/</span></span><span><span>p</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;/</span></span><span><span>else</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>else</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;</span></span><span><span>strong</span></span><span><span>&gt;</span></span><span><span>RSVP for this event:</span><span><span>&lt;/</span></span><span><span>strong</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>else</span></span><span><span>&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 23. Multi-Level Condition Output - Spark</i></p>
<h3><span><span><span>Example of Loop - For Element </span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>ul</span></span><span><span>
</span></span><span><span>class</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>upcomingdinners</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>for</span></span><span><span>
</span></span><span><span>each</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>var dinner in Model</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>li</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !{ Html.ActionLink(dinner.Title, &quot;Details&quot;, new { id=dinner.DinnerID }) }</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span></span><span><span>li</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;/</span></span><span><span>for</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>ul</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 24. For Element Usage -Spark</i></p>
<h3><span><span><span>Example of Loop -&nbsp; each Attribute</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>ul</span></span><span><span>
</span></span><span><span>class</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>upcomingdinners</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>li</span></span><span><span>
</span></span><span><span>each</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>var dinner in Model</span></span><span>&quot;</span><span><span>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !{ Html.ActionLink(dinner.Title, &quot;Details&quot;, new { id=dinner.DinnerID }) }</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; </span><span><span>&lt;/</span></span><span><span>li</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>ul</span></span><span><span>&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 25.&nbsp; Each Attribute Usage -Spark</i></p>
<h3><span><span><span>Global Html Encoding Setting</span></span></span></h3>
<p class="MsoNormal">For html cncoding you can set the <span><span><span>automaticEncoding</span></span></span> flag in the spark section of your web.config file to turn html encoding on by default. This will cause every ${expr} expression evaluation to be
 Html encoded.&nbsp; </p>
<p class="MsoNormal">If you need to specify an expression to not be Html encoded, use the !{ expr } syntax.</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&nbsp; &lt;</span></span><span><span>spark</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>compilation</span></span><span><span>
</span></span><span><span>debug</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>defaultLanguage</span></span><span><span>=</span></span><span>&quot;</span><span><span>CSharp</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>pages</span></span><span><span>
</span></span><span><span>automaticEncoding</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>false</span></span><span>&quot;</span><span><span> &gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 26.&nbsp; AutomaticEncoding Attribute Set in Web.Config -Spark</i></p>
<h3><span><span><span>Html Encoding Inline</span></span></span></h3>
<p class="MsoNormal">Spark provides a utility method that will Html Encode expressions called H( ). However, I recommend having automaticEncoding on via the global setting and using the !{ } syntax for when you don’t want to include Html Encoding.</p>
<h3><span><span><span>Example of Global Namespace Import in Web.Config</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&nbsp; &lt;</span></span><span><span>spark</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>compilation</span></span><span><span>
</span></span><span><span>debug</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>defaultLanguage</span></span><span><span>=</span></span><span>&quot;</span><span><span>CSharp</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>pages</span></span><span><span>
</span></span><span><span>automaticEncoding</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>false</span></span><span>&quot;</span><span><span> &gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>namespaces</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Collections.Generic</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 27. Global Namespace Import -Spark</i></p>
<h3><span><span><span>Example of Importing&nbsp; a Namespace</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>use</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>NerdDinner.Helpers</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 28. Adding a Namespace Import - Spark</i></p>
<h3><span><span><span>Global Master Page Support</span></span></span></h3>
<p class="MsoNormal">Spark includes a site-wide master page (or layout), which allows you to have all views use a master page without having to specify the name for each of the views.</p>
<p class="MsoNormal">In order to create a global master page/layout, create an Application.spark file in the Views/Layouts folder or the Views/Shared folder.</p>
<p class="MsoNormal">You can also create a layout for a specific controller. To do so, create a layout with the same name as the controller.</p>
<h3><span><span><span>Example of Setting Master Page in a View</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>use</span></span><span><span>
</span></span><span><span>master</span></span><span><span>=</span></span><span><span>&quot;AlternateMaster&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 29. Master Layout Assignment -Spark</i></p>
<h3><span><span><span>Example of Master Layout with Multiple Content Elements</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;head&gt;</span></span></span><span> <br>
</span><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>title</span></span><span><span>&gt;&lt;</span></span><span><span>use</span></span><span><span>
</span><span><span>content</span></span><span><span>=&quot;TitleContent&quot;</span></span><span>
</span><span><span>/&gt;&lt;/</span></span><span><span>title</span></span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>use</span></span><span><span>
</span><span><span>content</span></span><span><span>=&quot;HeadContent&quot;</span></span><span>
</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/head&gt;</span></span><span><span>&nbsp;&nbsp;&nbsp; </span>
</span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 30. Master Layout with Content Elements -Spark</i></p>
<h3><span><span><span>Example of a View with Multiple Content Elements </span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>content</span></span><span><span>
</span></span><span><span>name</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>TitleContent</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; Upcoming Nerd Dinners</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>content</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>content</span></span><span><span>
</span></span><span><span>name</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>HeadContent</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; # Html.RenderPartial(&quot;Masthead&quot;, false);
</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/</span></span><span><span>content</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>This text will be in the view's main content … notice this is not in a content element.</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 31.&nbsp; View with Multiple Content Elements -Spark</i></p>
<h3><span><span><span>Special Partial View Syntax</span></span></span></h3>
<p class="MsoNormal">Spark provides a special partial view syntax that,flows better than the HtmlHelper syntax.&nbsp;
</p>
<p class="MsoNormal">If the name of your partial view file begins with an underscore character, you can use an element in your content to represent the partial view (minus the underscore) . For example, in my NerdDinner Spark port, there is a layout named _LoginStatus.spark.
 This allows me to use the element &lt;LoginStatus /&gt; to represent the output location I want for the contents of that partial view.&nbsp;
</p>
<h2><span><span><span>Visual Studio Integration</span></span></span></h2>
<p class="MsoNormal">Since Spark is a third party view engine, the Visual Studio tooling isn’t as good as the WebFormViewEngine. This means that you currently don’t get the functionality provided by the Add View dialog described in the WebFormViewEngine section
 and so are stuck working with text or html looking files.</p>
<h3><span><span><span>IntelliSense Support</span></span></span></h3>
<p class="MsoNormal">For Visual Studio 2008, there is an msi installer included for the 3-9-2009 Build available on the
<a href="http://sparkviewengine.com/download"><span>http://sparkviewengine.com/download</span></a> site.</p>
<p class="MsoNormal">For Visual Studio 2010, there is a Visual Studio Addin available in Visual Studio Gallery:
<a href="http://visualstudiogallery.msdn.microsoft.com/en-us/ef944259-fc8a-42e0-838e-f397957e1d11">
<span>SparkSense</span></a>.</p>
<h2><span><span><span>Getting Support</span></span></span></h2>
<p class="MsoNormal">For an open source project, Spark is pretty well documented. The documentation can be found on the project site at
<a href="http://sparkviewengine.com/documentation"><span>http://sparkviewengine.com/documentation</span></a>.</p>
<p class="MsoNormal">The Spark View Engine also has a Google Group where you can get answers to your questions. Check it out at
<a href="http://groups.google.com/group/spark-dev"><span>http://groups.google.com/group/spark-dev</span></a>.</p>
<p class="MsoNormal">The Issue Tracker is available on the on the CodePlex site: <a href="http://sparkviewengine.codeplex.com/workitem/list/basic">
<span>http://sparkviewengine.codeplex.com/workitem/list/basic</span></a>.</p>
<h3><span><span><span>Spark View Engine Strengths</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Syntax produces clean views</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Views don’t use the Page class and so are easier to test</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Well documented with a lot of samples included in the download</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Supports other MVC frameworks</p>
<h3><span><span><span>Spark View Engine Weaknesses</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Visual Studio tooling isn’t as good as the default view engine</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Advanced usage of some features can make the views harder for a developer to follow</p>
<h1><span><span><span>NHaml View Engine</span></span></span></h1>
<p class="MsoNormal">The NHaml (pronounced enamel) view engine is an implementation of the Rails Haml view engine, and its syntax is an abstraction of usual tag based XHTML syntax used by most view engines.&nbsp; As you can see in the screen shot below, it takes
 only 19 lines in NHaml to create the same view created with 42 lines in the WebFormViewEngine and Spark view engines. A couple of other differences are that the syntax is white space sensitive and you don’t have to set the type of the view model (it figures
 it out for you).</p>
<p class="MsoNormal">The file extension used for views, partial views and layouts (master pages) is .haml</p>
<p class="MsoNormal">Below is a screen shot of a view written using the NHaml view engine:</p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/5661.image_5F00_22.png"><strong></strong></a><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/1067.image_5F00_22.png"><img height="210" width="500" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/6254.image_5F00_thumb_5F00_10.png" alt="image" border="0" title="image"></a><a></a><a></a></p>
<p align="center" class="MsoNormal"><strong></strong></p>
<p align="center" class="MsoNormal"><strong>Screenshot 3.&nbsp; NerdDinners Dinner/Index View in NHaml</strong></p>
<h2><span><span><span>History</span></span></span></h2>
<p class="MsoNormal">Haml was started in May 2006 by Hampton Catlin and from what I can find on the internet, Andrew Peters introduced NHaml to the world in December 2007.&nbsp; The syntax is pretty much the same as Haml, but the parsing/compiling was all written
 from the ground up.&nbsp; Like Spark, NHaml does not use the ASP.NET’s Page for its view, it has its own implementation.</p>
<h2><span><span><span>Key Features</span></span></span></h2>
<p class="MsoNormal">NHaml supports 14 features from the desired feature list.</p>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Feature</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><b><span><span>Notes</span></span></b></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Multi Line Code Blocks</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Inline Expression</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Local Variables</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Variables</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Conditional Output</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Multiple Level Conditionals</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Loops</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Html Encoding Shortcut</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Setting for Html Encoding</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Namespace Imports</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Have to add all namespace imports to the web.config</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Master Page</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Special Syntax for Partial Views</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Visual Studio Integration</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Add-in exist for VS 2008</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Other MVC Frameworks</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
</tbody>
</table>
<h2><span><span><span>Getting Started</span></span></span></h2>
<p class="MsoNormal">NHaml is available for download from the project’s website at
<a href="http://code.google.com/p/nhaml/downloads/list"><span>http://code.google.com/p/nhaml/downloads/list</span></a>. After you have downloaded the release package and extracted its contents, you can add the NHaml view engine to your ASP.NET MVC project by
 performing the following steps:</p>
<p class="MsoListParagraphCxSpFirst">1.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Set a reference to the NHaml.dll and NHaml.Web.Mvc.dll libraries included in the release download.</p>
<p class="MsoListParagraphCxSpLast">2.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Open the Global.asax.cs file and add a new NHaml.Web.NHamlMvcViewEngine to the ViewEngines.Engines collection:</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>void</span></span><span><span> Application_Start()</span></span></span></p>
<p class="MsoNormal"><span><span><span>{</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; RegisterRoutes(</span><span><span>RouteTable</span></span><span>.Routes);</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; </span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; </span><span><span>ViewEngines</span></span><span>.Engines.Add(</span><span><span>new</span></span><span> NHaml.Web.Mvc.</span><span><span>NHamlMvcViewEngine</span></span><span>());</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph">3.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>In your web.config file, add a section to your configSections for the NHamlConfigurationSection handler as shown below:</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>configuration</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;</span></span><span><span>configSections</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; </span><span><span>&lt;</span></span><span><span>section</span></span><span><span>
</span></span><span><span>name</span></span><span><span>=</span></span><span>&quot;</span><span><span>nhaml</span></span><span>&quot;</span><span><span>
</span></span><span><span>type</span></span><span><span>=</span></span><span>&quot;</span><span><span>NHaml.Configuration.NHamlConfigurationSection, NHaml</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph">4.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Add the &lt;nhaml&gt; section to your web.config file. As mentioned in the Spark setup, I put mine right after the &lt;/connectionStrings&gt; element. Below is the section I used to port the NerdDinner
 project to NHaml—notice it has more assemblies and namespace declarations than the one provided in the Spark setup:</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>nhaml</span></span><span><span>
</span></span><span><span>autoRecompile</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>templateCompiler</span></span><span><span>=</span></span><span>&quot;</span><span><span>CSharp4</span></span><span>&quot;</span><span><span>
</span></span><span><span>encodeHtml</span></span><span><span>=</span></span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>useTabs</span></span><span><span>=</span></span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>indentSize</span></span><span><span>=</span></span><span>&quot;</span><span><span>4</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>assemblies</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>clear</span></span><span><span>/&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>assembly</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>assembly</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>NerdDinner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>assembly</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>DDay.iCal, Version=0.80.0.0, Culture=neutral, PublicKeyToken=1790ba318ebc5d56</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>assembly</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>Elmah, Version=1.0.10617.0, Culture=neutral, PublicKeyToken=null</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>assembly</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>DotNetOpenAuth, Version=3.4.4.10162, Culture=neutral, PublicKeyToken=2780ccd10d57b246</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>assembly</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>OpenSearchToolkit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span></span><span><span>assemblies</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>namespaces</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>clear</span></span><span><span>/&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Collections</span></span><span>&quot;</span><span><span>/&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>NerdDinner</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>NerdDinner.Helpers</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>NerdDinner.Models</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>DotNetOpenAuth.OpenId.RelyingParty</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>DotNetOpenAuth.Mvc</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc.Html</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Globalization</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc.Ajax</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Linq</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span></span><span><span>namespaces</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;/</span></span><span><span>nhaml</span></span><span><span>&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph">5.<span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>Check the configuration documentation at
<a href="http://code.google.com/p/nhaml/wiki/Configuration"><span>http://code.google.com/p/nhaml/wiki/Configuration</span></a> to determine your project needs.</p>
<h2><span><span><span>Dependencies</span></span></span></h2>
<p class="MsoNormal">In order to be used, the NHaml view engine requires that the following two dll’s be referenced in your MVC project: NHaml.dll and NHaml.Web.Mvc.dll.</p>
<h2><span><span><span>Feature Syntax</span></span></span></h2>
<p class="MsoNormal">Whitespace is important and represents the hierarchy of the final XHTML document being marked up in the view in addition to the scoping of things such as for loops and if statements.</p>
<h3><span><span><span>Example of a Multi-Line Code Block</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>- string message = &quot;The time is: {0}&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>- string timeString = DateTime.Now.ToShortTimeString();</span></span></span></p>
<p class="MsoNormal"><span><span><span>- string output = string.Format(message, timeString);</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>The result from serverside code is: </span>
</span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =output</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 32. Using CodeBlocks - NHaml</i></p>
<h3><span><span><span>Inline Expression</span></span></span></h3>
<p class="MsoNormal">To indicate which code should be evaluated in NHaml, you use either universal interpolation or evaluate output. The Universal Interpolation allows you to leave expressions to be evaluated in the middle of a line even though the evaluate
 output is typically at the beginning of a line.</p>
<h4><span><span><span><em>Example of the #{ } Syntax to Evaluate Inline Code</em></span></span></span></h4>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>%a { class=&quot;feed&quot; href=#{Url.Action(&quot;iCalFeed&quot;, &quot;Services&quot;, null, &quot;webcal&quot;)} }</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 33. Using Inline Expression - NHaml</i></p>
<h4><span><span><span><em>Example of the = Syntax to Evaluate and Output Code</em></span></span></span></h4>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>=dinner.Address &#43; &quot; &quot; &#43; dinner.Country</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 34. Using Inline Expression2- NHaml</i></p>
<h3><span><span><span>Example of Creating and Using a Local Variable</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>- string message = &quot;The time is a message&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>The result from serverside code is: </span>
</span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; =message</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 35. Local Variable Usage - NHaml</i></p>
<h3><span><span><span>Example of a Creating and Using Global Variable</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>^ string PageTitle = &quot;&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; - if (PageTitle != &quot;&quot;)</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; %title=PageTitle</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 36. Global Variable Usage - NHaml</i></p>
<h3><span><span><span>Example of Conditional Output</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>%strong Who's Coming:</span></span></span></p>
<p class="MsoNormal"><span><span><span>- if (Model.RSVPs.Count == 0)</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; No one has registered.</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 37. Conditional Output - NHaml</i></p>
<h3><span><span><span>Example of Multi Level Condition Output</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>- if (HttpContext.Current.Request.IsAuthenticated)</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; - if (Model.IsHostedBy(HttpContext.Current.User.Identity.Name))</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; %p You are the host for this event!</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; - else if (Model.IsUserRegistered(HttpContext.Current.User.Identity.Name))</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; %p You are registered for this event!</span></span></span></p>
<p class="MsoNormal"><span><span><span>- else </span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; %strong RSVP for this event:</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 38. Multi-Level Condition Output - NHaml</i></p>
<h3><span><span><span>Example of Loop - foreach</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>- foreach (var dinner in Model)</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; %li</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; !=Html.ActionLink(dinner.Title, &quot;Details&quot;, new { id=dinner.DinnerID })</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 39. Loop ForEach - NHaml</i></p>
<h3><span><span><span>Example of Global Html Encoding Setting in Web.Config</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>nhaml</span></span><span><span>
</span></span><span><span>autoRecompile</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>templateCompiler</span></span><span><span>=</span></span><span>&quot;</span><span><span>CSharp4</span></span><span>&quot;</span><span><span>
</span></span><span><span>encodeHtml</span></span><span><span>=</span></span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span><span><span>useTabs</span></span><span><span>=</span></span><span>&quot;</span><span><span>true</span></span><span>&quot;</span><span><span>
</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; </span></span><span><span>indentSize</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>4</span></span><span>&quot;</span><span><span>&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 40. Global HtmlEncoding Setting&nbsp; - NHaml</i></p>
<h3><span><span><span>Example of Html Encoding Inline</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&amp;= dinner.Address &#43; &quot; &quot; &#43; dinner.Country</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 41. Html Encoding Inline - NHaml</i></p>
<h3><span><span><span>Global Master Page Support</span></span></span></h3>
<p class="MsoNormal">NHaml has the concept of a site-wide master page (or layout) named Application.haml. In the layout, the view’s contents have a special placeholder ‘_’.</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>!!!</span></span></span></p>
<p class="MsoNormal"><span><span><span>%html</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %head</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _ TitleContent</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _ HeadArea</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %body</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 42. Global Master Page - NHaml</i></p>
<h3><span><span><span>Special Partial View Syntax</span></span></span></h3>
<p class="MsoNormal">In NHaml, partial views use a ‘_’ as the first character in their file names. This allows you to place the contents of a partial view in another view (or layout) by using the special syntax of _ &lt;viewname&gt;.</p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _ LoginStatus</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 43. Special Syntax for Partial Views - NHaml</i></p>
<h2><span><span><span>Visual Studio Integration</span></span></span></h2>
<p class="MsoNormal">Like Spark, NHaml is a third party view engine started by one person, so the Visual Studio tooling isn’t as good as the default view engine, though a few addins have been created by the community. Dave Newman created a syntax highlighting
 add-in for Visual Studio 2008: <a href="http://github.com/snappycode/hamleditor">
<span>http://github.com/snappycode/hamleditor</span></a></p>
<p class="MsoNormal">There is also an Intellisense project for NHaml created by sztupy and available at:
<a href="http://github.com/sztupy/nhamlsense%20for%20Visual%20Studio%202008"><span>http://github.com/sztupy/nhamlsense for Visual Studio 2008</span></a>.</p>
<h2><span><span><span>Getting Support</span></span></span></h2>
<p class="MsoNormal">Although NHaml has been around for a little longer than Spark, it isn’t quite as well documented (less reference material and less samples).&nbsp;
</p>
<p class="MsoNormal">A pretty good language reference can be found on the project’s site at:
<a href="http://code.google.com/p/nhaml/wiki/NHamlLanguageReference"><span>http://code.google.com/p/nhaml/wiki/NHamlLanguageReference</span></a>
</p>
<p class="MsoNormal">NHaml also has a Google Group where you can get answers to your questions:
<a href="http://groups.google.com/group/nhaml-users"><span>http://groups.google.com/group/nhaml-users</span></a>
</p>
<p class="MsoNormal">As with Spark (don’t forget it is Open Source), you can look at the code and attempt to figure out how things work on your own without using any documentation or support.</p>
<h3><span><span><span>Strengths</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Terse syntax that creates views with less code</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Has a lot of features that help create html</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Views don’t use the Page Class and so are easier to test</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Supports languages other than C# and Visual Basic</p>
<h3><span><span><span>Weaknesses</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>The syntax results in a greater learning curve</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Poorly documented with hard to find samples</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Error messages make it difficult to decipher syntax errors</p>
<p class="MsoNormal">&nbsp;</p>
<h1><span><span><span>Razor </span></span></span></h1>
<p class="MsoNormal">Razor is a new view engine still under development at Microsoft. The initial pre-release of the view engine became available with the MVC 3 Preview 1 release.&nbsp;
</p>
<p class="MsoNormal">The Razor view engine is being designed to mix the code and markup together—not in the same sense as Spark (there aren’t any elements to represent functionality), but in the sense that the code and markup play well together with minimal
 control characters. Unlike the WebFormViewEngine, Razor doesn’t extend the System.Web.Page class.</p>
<p class="MsoNormal">The file extension currently used for views, partial views and layouts (master pages) is .cshtml and also in the future .vbhtml for VisualBasic support.</p>
<p class="MsoNormal">Below is a screenshot of a view written using the Razor view engine.</p>
<p align="center" class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/5684.image_5F00_24.png"><strong></strong></a><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/4113.image_5F00_24.png"><img height="419" width="500" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/2548.image_5F00_thumb_5F00_11.png" alt="image" border="0" title="image"></a><a></a><a></a></p>
<p align="center" class="MsoNormal"><strong>Screenshot 4.&nbsp; NerdDinners Dinner/Index View in Razor</strong></p>
<h2><span><span><span>History</span></span></span></h2>
<p class="MsoNormal">No history known about this one.</p>
<h2><span><span><span>Key Features</span></span></span></h2>
<p class="MsoNormal">Razor currently supports 14 features (plus more coming soon) from the desired feature list.</p>
<table cellpadding="0" cellspacing="0" border="1" class="LightShading-Accent11">
<tbody>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Feature</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><b><span><span>Notes</span></span></b></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Multi Line Code Blocks</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Inline Expression</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Local Functions</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>Not as of MVC 3 Preview 1, but special HtmlHelper syntax coming soon.</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Local Variables</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Conditional Output</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Multiple Level Conditionals</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Loops</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Setting for Html Encoding</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>No setting currently , it is just on by default</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Import Namespaces</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Namespace Imports</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Single View Master Page</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Global Master Page</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Content Placeholders</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Support for Editor Templates</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>&nbsp;</span></span></p>
</td>
</tr>
<tr>
<td width="271" valign="top">
<p class="MsoNormal"><b><span><span>Visual Studio Integration</span></span></b></p>
</td>
<td width="367" valign="top">
<p class="MsoNormal"><span><span>IntelliSense coming soon</span></span></p>
</td>
</tr>
</tbody>
</table>
<h2><span><span><span>Getting Started</span></span></span></h2>
<p class="MsoNormal">In order to use the Razor view engine, you will need the ASP.NET MVC 3 Preview 1 framework installed.&nbsp; You can download it here:
<a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=cb42f741-8fb1-4f43-a5fa-812096f8d1e8#filelist">
<span>http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=cb42f741-8fb1-4f43-a5fa-812096f8d1e8#filelist</span></a></p>
<p class="MsoNormal">Check the release notes at that same link for any system requirements.&nbsp;
</p>
<p class="MsoNormal">Once you have ASP.NET MVC 3 Preview 1 installed, you will have a new project type for ASP.NET MVC 3 Web Application (Razor).</p>
<h2><span><span><span>Dependencies</span></span></span></h2>
<p class="MsoNormal">Currently the Razor view engine is in the System.Web.Mvc.dll and shipped with the MVC 3 Preview 1 framework, so there are no external dependencies if you have already downloaded it as mentioned in the Getting Started section above.
</p>
<h2><span><span><span>Feature Syntax</span></span></span></h2>
<p class="MsoNormal">The syntax shown for Razor features is all subject to change, since it is based on a pre-release version.</p>
<h3><span><span><span>Example of Multi Line Code Blocks</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>@{</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string message = &quot;The time is: {0}&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string timeString = DateTime.Now.ToShortTimeString();</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string output = string.Format(message, timeString);</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>The result from serverside code is: @output</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 44.&nbsp; Multi Line Code Block - Razor</i></p>
<h3><span><span><span>Example of Inline Expression</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;script src=&quot;@Url.Content(&quot;~/Scripts/MSAjaxHistoryBundle.js&quot;)&quot;
</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 45.&nbsp; Inline Expression - Razor</i></p>
<h3><span><span><span>Example of Creating and Using a Local Variable</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>@{</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp; string message = &quot;Hello World&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>The result message is: @message</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 46.&nbsp; Local Variable Usage - Razor</i></p>
<h3><span><span><span>Example of Conditional Output</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;strong&gt;Who's Coming:&lt;/strong&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>@if (Model.RSVPs.Count == 0) {</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;text&gt;No one has registered.&lt;/text&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 47.&nbsp; Conditional Output - Razor</i></p>
<h3><span><span><span>Example of Multi Level Condition Output</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>@if (Request.IsAuthenticated) {</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; if (Model.IsHostedBy(Context.User.Identity.Name)) {
</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp; &lt;p&gt;You are the host for this event!&lt;/p&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; } else if (Model.IsUserRegistered(Context.User.Identity.Name)) {</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp; &lt;p&gt;You are registered for this event!&lt;/p&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; }</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span><span><span>else </span></span></span></p>
<p class="MsoNormal"><span><span><span>{</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; &lt;strong&gt;RSVP for this event:&lt;/strong&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 48.&nbsp; Mult-Level Conditional Output - Razor</i></p>
<h3><span><span><span>Example of Loop - Foreach</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>@foreach (var dinner in Model) { </span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;li&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp; @Html.ActionLink(dinner.Title, &quot;Details&quot;, new { id=dinner.DinnerID })</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp; &lt;/li&gt;&nbsp;&nbsp;&nbsp; </span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 49.&nbsp; Loop - Foreach - Razor</i></p>
<h3><span><span><span>Example of Global Namespace Import (Same as WebFormsViewEngine)</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;</span></span><span><span>pages</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp; &lt;</span></span><span><span>namespaces</span></span><span><span>&gt;</span></span></span><span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span></span><span><span>add</span></span><span><span>
</span></span><span><span>namespace</span></span><span><span>=</span></span><span><span>&quot;</span><span><span>System.Web.Mvc.Ajax</span></span><span>&quot;</span><span><span> /&gt;</span></span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 50.&nbsp; Global Namespace Import - Razor</i></p>
<h3><span><span><span>Example of Importing a Namespace in a View</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>@using NerdDinner.Helpers;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 51.&nbsp; Single View Namespace Import - Razor</i></p>
<h3><span><span><span>Global Master Page Support</span></span></span></h3>
<p class="MsoNormal">Razor has the concept of a site wide master page (or layout) like Spark and NHaml.&nbsp; This allows you to create a master page in the Views/Shared directory named Application.spark and you don’t have to specify the layout page in the individual
 views.</p>
<h3><span><span><span>Example of Setting a Master Page (Layout) in a View</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>@{</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LayoutPage = &quot;~/Views/Shared/_Layout.cshtml&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 52.&nbsp; Single View Master Page - Razor</i></p>
<h3><span><span><span>Example of Master Page with Content Placeholders</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>&lt;head&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;title&gt;@View.Title&lt;/title&gt;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @RenderSection(&quot;HeadArea&quot;, optional:true)</span></span></span></p>
<p class="MsoNormal"><span><span><span>&lt;/head&gt;</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 53.&nbsp; Master Page with Content Placeholders - Razor</i></p>
<h3><span><span><span>Example of View with Multiple Content Elements</span></span></span></h3>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid">
<tbody>
<tr>
<td width="638" valign="top">
<p class="MsoNormal"><span><span><span>@{</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; View.Title = &quot;Upcoming Nerd Dinners&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LayoutPage = &quot;~/Views/Shared/_Layout.cshtml&quot;;</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>@section HeadArea {</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @Html.Partial(&quot;_Head&quot;, false)</span></span></span></p>
<p class="MsoNormal"><span><span><span>}</span></span></span></p>
<p class="MsoNormal"><span><span><span>&nbsp;</span></span></span></p>
<p class="MsoNormal"><span><span><span>This text will be in the view's main content … notice this is not in a section.</span></span></span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i>Code Sample 54.&nbsp; View with Multiple Content Elements/Sections - Razor</i></p>
<h2><span><span><span>Visual Studio Integration</span></span></span></h2>
<p class="MsoNormal">Since the Razor view engine is being developed by Microsoft, you will (eventually) get full Visual Studio support.&nbsp; With the ASP.NET MVC 3, Preview 1 release, some tooling has been added – though IntelliSense is not yet working.</p>
<h3><span><span><span>New Project Template for Razor</span></span></span></h3>
<p class="MsoNormal">There are now two choices for ASP.NET MVC 3 Web Applications – one for the ASPX (WebFormsViewEngine) and the other for Razor.</p>
<p class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/2047.image_5F00_26.png"><img height="346" width="500" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/3527.image_5F00_thumb_5F00_12.png" alt="image" border="0" title="image"></a></p>
<p class="MsoNormal">&nbsp;</p>
<h3><span><span><span>Add View Dialog </span></span></span></h3>
<p class="MsoNormal">The add View Dialog box, now allows you to choose which view engine you are using – and Razor is now a choice for you.</p>
<p class="MsoNormal"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/8080.image_5F00_28.png"><img height="445" width="450" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-39-metablogapi/6254.image_5F00_thumb_5F00_13.png" alt="image" border="0" title="image"></a></p>
<p class="MsoNormal">&nbsp;</p>
<h2><span><span><span>Getting Support</span></span></span></h2>
<p class="MsoNormal">Since MVC 3 Preview 1 is a pre-release version, it isn’t a fully supported release – though you can get community (and often team) support in the forums at:
<a href="http://forums.asp.net/1146.aspx"><span>http://forums.asp.net/1146.aspx</span></a></p>
<h3><span><span><span>Strengths</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Easy to learn</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Views are cleaner than WebFormViewEngine view syntax</p>
<p class="MsoListParagraphCxSpMiddle"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Views don’t use the Page Class – so they are easier to test</p>
<h3><span><span><span>Weaknesses</span></span></span></h3>
<p class="MsoListParagraphCxSpFirst"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Not yet released – current documentation is minimal with no central location to find information on the view engine.</p>
<p class="MsoListParagraphCxSpLast"><span><span>·</span><span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span>Error messages are hard to decipher when you get the syntax wrong</p>
<p class="MsoNormal">&nbsp;</p>
<h1><span><span><span>Summary</span></span></span></h1>
<p class="MsoNormal">To conclude this Developer Review, I hope we have provided you with enough useful information about the default ASP.NET MVC view engine, Spark, NHaml and Razor to help you decide which is best for you.</p>
<h1><span><span><span>Side Note </span></span></span></h1>
<h2><span><span><span>My Thoughts After Converting the Views NerdDinner’s Views</span></span></span></h2>
<p class="MsoNormal">After converting the views of the NerdDinner example to Spark, NHaml and Razor here are my thoughts on the different view engines:</p>
<p class="MsoNormal"><b>Default ASP.NET MVC View Engine</b> <br>
Still my favorite view engine, though the tendency of ending up with views that feel messy does bother me.&nbsp; For client work, I will be using this view engine probably for quite some time – especially if the client&nbsp; is going to be supporting the resulting views.</p>
<p class="MsoNormal"><b>Spark</b> <br>
Initially the syntax reminded me of the year I&nbsp; used ColdFusion, but once I got past that I really enjoyed the clean look the view has when it is complete.&nbsp; I am really impressed with the functionality it provides&nbsp; as well as the documentation and samples available
 for it.</p>
<p class="MsoNormal"><b>NHaml</b> <br>
At first I wasn’t a fan of the Haml syntax, but its efficiency eventually attracted me to it. I can see using this view engine on my own site in the future, though I don’t think it is a good choice for working on a typical client’s site (if the client will
 be supporting it).</p>
<p class="MsoNormal"><b>Razor <br>
</b>Though this view engine isn’t yet completed, the syntax that Razor uses is really easy to pick up and does leave the view looking better than on the default view engine.&nbsp;
</p>
<h1><span><span><span>About the Author</span></span></span></h1>
<p class="MsoNormal">Jason Haley has been working with Microsoft technologies for the past 15 years in various settings – mostly in the New England and Seattle areas.&nbsp; Last year (2009), he decided to become an independent consultant and started Jason Haley
 Consulting.&nbsp; Now almost a year of being gainfully unemployed, he is building his client base in the New England area and enjoying the opportunities of working with multiple clients instead of just a single full-time employer.&nbsp; Jason also has a few open source
 projects on CodePlex, of which the most popular is PowerCommands for Reflector (http://powercommands.codeplex.com/)
<br clear="all">
</p>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:6a154645c6ee4fb8a7a99e7600c87d23">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/Developer-Review-Four-ASPNET-MVC-View-Engines</comments>
      <itunes:summary>
Introduction
In this Developer Review, we evaluate four view engines available for use with ASP.NET MVC. First, we discuss the role a view engine plays in a website built with ASP.NET MVC, then we provide details about the four view engines in order
 to help you decide which one suits your needs.  




Jason Haley 
http://jasonhaley.com/blog/ 


Source Code: Download in Branches/Playground directory 
&amp;nbsp; 




What Does a View Engine Do?
When we refer to a view engine in ASP.NET MVC, we are talking about three pieces of functionality: 
&#183;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
A template locator/provider (implementation of IViewEngine) 
&#183;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
A template that can render itself (implementation of IView) 
&#183;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
A template engine that can parse and compile the view file syntax into executable code 
Combining these three pieces, a view engine provides your controllers with the ability to translate views into Html. 
Why Use an Alternate View Engine?
Though the view engine that ships with ASP.NET MVC has all the functionality you need to create views for just about any website project, it is also easily replaced.
 
As with choosing a programming language in .Net, there are many reasons why you may choose one view engine over another: 
Syntax 
ASP.NET MVC’s default view syntax is sometimes described as “tag soup.” This is due to the mix of all the&amp;nbsp;
&amp;lt;% … %&amp;gt; tags along with the Html markup and causes some developers to feel like the view is messy.
 
Skillset/background 
Many developers have already used the Castle Monorail MVC framework and are experiences with the view engines provided for that framework. Accordingly, it makes sense to leverage that experience by using a similar view engine in ASP.NET MVC. 
Productivity 
For you, productivity may mean quick and easy to learn syntax or it may mean terse and less code. Depending on which is right for you, you may choos</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/articles/Developer-Review-Four-ASPNET-MVC-View-Engines</link>
      <pubDate>Mon, 04 Oct 2010 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/Developer-Review-Four-ASPNET-MVC-View-Engines</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/c4f/images/10070953_100.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/c4f/images/10070953_220.jpg" height="165" width="220"></media:thumbnail>      
      <dc:creator>Jason Haley</dc:creator>
      <itunes:author>Jason Haley</itunes:author>
      <slash:comments>6</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/articles/Developer-Review-Four-ASPNET-MVC-View-Engines/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>ASP.NET MVC</category>
      <category>Razor</category>
      <category>spark</category>
      <category>reviews</category>
      <category>Review</category>
      <category>NHaml</category>
    </item>
  <item>
      <title>Installing Microsoft WebMatrix Beta</title>
      <description><![CDATA[ <p>You may have heard that Microsoft announced a new streamlined web development tool recently called WebMatrix. In this devnugget, the first in a series on WebMatrix, I walk you through locating and installing WebMatrix.<br><br>Here's what I have in mind for future installments:</p><ul><li>What the various options are for creating sites with WebMatrix </li><li>How you can create a site from a Template, and what you end up with when you do </li><li>How to create a new site from an existing open source application from the Gallery </li><li>What this new &quot;Razor&quot; syntax is, and why it's cool </li><li>How to publish your application </li><li>more... </li></ul><p>If there's a particular aspect of WebMatrix that you'd like to see a DevNugget on, please add your comments below, or drop me an email via my blog at <a class="_b_auto" href="http://bit.ly/devhammerContact" target="_top">http://bit.ly/devhammerContact</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:5da40d9df3e041b08fda9de9018647ee">]]></description>
      <comments>http://channel9.msdn.com/Shows/DevNuggets/Installing-Microsoft-WebMatrix-Beta</comments>
      <itunes:summary> You may have heard that Microsoft announced a new streamlined web development tool recently called WebMatrix. In this devnugget, the first in a series on WebMatrix, I walk you through locating and installing WebMatrix.Here&#39;s what I have in mind for future installments: What the various options are for creating sites with WebMatrix How you can create a site from a Template, and what you end up with when you do How to create a new site from an existing open source application from the Gallery What this new &amp;quot;Razor&amp;quot; syntax is, and why it&#39;s cool How to publish your application more... If there&#39;s a particular aspect of WebMatrix that you&#39;d like to see a DevNugget on, please add your comments below, or drop me an email via my blog at http://bit.ly/devhammerContact. </itunes:summary>
      <itunes:duration>524</itunes:duration>
      <link>http://channel9.msdn.com/Shows/DevNuggets/Installing-Microsoft-WebMatrix-Beta</link>
      <pubDate>Fri, 27 Aug 2010 17:39:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/DevNuggets/Installing-Microsoft-WebMatrix-Beta</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9765/569765/InstallWebMatrix_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9765/569765/InstallWebMatrix_ch9.mp3" expression="full" duration="524" fileSize="4193725" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9765/569765/InstallWebMatrix_ch9.mp4" expression="full" duration="524" fileSize="38560932" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9765/569765/InstallWebMatrix_ch9.wma" expression="full" duration="524" fileSize="4249629" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9765/569765/InstallWebMatrix_ch9.wmv" expression="full" duration="524" fileSize="34392569" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/9765/569765/InstallWebMatrix_ch9.wmv" length="34392569" type="video/x-ms-wmv"></enclosure>
      <dc:creator>G. Andrew Duthie</dc:creator>
      <itunes:author>G. Andrew Duthie</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/DevNuggets/Installing-Microsoft-WebMatrix-Beta/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>Beginner</category>
      <category>DevNuggets</category>
      <category>Getting Started</category>
      <category>Installation</category>
      <category>Razor</category>
      <category>WebMatrix</category>
    </item>
  <item>
      <title>Web Camps TV #1 - ASP.NET MVC 3 Preview 1 and Razor Tips with Phil Haack</title>
      <description><![CDATA[
<p>It's the first episode of Web Camps TV—the show that gets you inside the Microsoft Web Platform!&nbsp;
<br /><br />In this episode,&nbsp;<a shape="rect" href="http://www.twitter.com/jsenior" shape="rect">James Senior</a> talks to
<a shape="rect" href="http://www.twitter.com/haacked" shape="rect">Phil Haack</a>, Senior PM on the ASP.NET MVC team, about&nbsp;ASP.NET MVC 3 Preview 1. Phil shows off his demo skills as he takes us on a tour of the new Razor syntax and highlights some tips and
 tricks on how to use it. He also talks about his favorite new features in ASP.NET MVC 3, including Dependency Injection, .NET 4 Data Annotation support, and the custom view engine dialog!<br /><br />For more information check out the following links:</p>
<ul>
<li><a shape="rect" href="http://go.microsoft.com/fwlink/?LinkID=157073" shape="rect">Download ASP.NET MVC 3 Preview 1</a>
</li><li><a shape="rect" href="http://haacked.com/archive/2010/07/27/aspnetmvc3-preview1-released.aspx" shape="rect">Read more on Phil's blog about the preview</a>&nbsp;
</li><li><a shape="rect" href="http://weblogs.asp.net/scottgu/archive/2010/07/27/introducing-asp-net-mvc-3-preview-1.aspx" shape="rect">Read more on ScottGu's blog about the preview</a>
</li></ul>
<p><b>NEWS FLASH: Phil and James will be down in Los Angeles on September 10th for the Web Camp! Make sure you sign up fast because tickets will be selling out soon!</b><b><br /><br /><b>Sign up for Web Camp here: <a shape="rect" href="http://www.webcamps.ms/" shape="rect">
www.webcamps.ms</a> </b></b></p>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:a22952cdca53490892109de90187cf8b">]]></description>
      <comments>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-1-ASPNET-MVC-3-Preview-1-and-Razor-Tips-with-Phil-Haack</comments>
      <itunes:summary>
It&#39;s the first episode of Web Camps TV—the show that gets you inside the Microsoft Web Platform!&amp;nbsp;
In this episode,&amp;nbsp;James Senior talks to
Phil Haack, Senior PM on the ASP.NET MVC team, about&amp;nbsp;ASP.NET MVC 3 Preview 1. Phil shows off his demo skills as he takes us on a tour of the new Razor syntax and highlights some tips and
 tricks on how to use it. He also talks about his favorite new features in ASP.NET MVC 3, including Dependency Injection, .NET 4 Data Annotation support, and the custom view engine dialog!For more information check out the following links: 

Download ASP.NET MVC 3 Preview 1
Read more on Phil&#39;s blog about the preview&amp;nbsp;
Read more on ScottGu&#39;s blog about the preview

NEWS FLASH: Phil and James will be down in Los Angeles on September 10th for the Web Camp! Make sure you sign up fast because tickets will be selling out soon!Sign up for Web Camp here: 
www.webcamps.ms  
</itunes:summary>
      <itunes:duration>1505</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-1-ASPNET-MVC-3-Preview-1-and-Razor-Tips-with-Phil-Haack</link>
      <pubDate>Wed, 25 Aug 2010 21:44:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-1-ASPNET-MVC-3-Preview-1-and-Razor-Tips-with-Phil-Haack</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/569395_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/569395_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_320_ch9.png" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_85_ch9.png" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_2MB_ch9.wmv" expression="full" duration="1505" fileSize="271664272" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_ch9.mp3" expression="full" duration="1505" fileSize="12046191" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_ch9.mp4" expression="full" duration="1505" fileSize="249915199" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_ch9.wma" expression="full" duration="1505" fileSize="12180189" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_ch9.wmv" expression="full" duration="1505" fileSize="178494461" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_Zune_ch9.wmv" expression="full" duration="1505" fileSize="160510516" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/9395/569395/webcamps1new_ch9.wmv" length="178494461" type="video/x-ms-wmv"></enclosure>
      <dc:creator>James Senior</dc:creator>
      <itunes:author>James Senior</itunes:author>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-TV-1-ASPNET-MVC-3-Preview-1-and-Razor-Tips-with-Phil-Haack/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>MVC</category>
      <category>Razor</category>
      <category>Web Camps</category>
      <category>Web Camps</category>
    </item>
  <item>
      <title>Andrew Nurse: Inside &quot;Razor&quot;</title>
      <description><![CDATA[ASP.NET's latest MVC view engine, &quot;Razor,&quot; is optimized for HTML generation using a code-focused templating approach. Razor minimizes the number of characters and keystrokes required in a file, and enables a fast, fluid coding workflow. Unlike most template
 syntaxes, you do not need to interrupt your coding to explicitly denote server blocks within your HTML. The parser is smart enough to infer this from your code. This enables a really compact and expressive syntax which is clean, fast, and fun to type.
<br /><br />How exactly does the &quot;Razor&quot; parser work? What were the design goals? How is it implemented? These are Going Deep questions and we knew exactly who could answer them. Meet
<a shape="rect" href="http://blog.andrewnurse.net/" target="_blank" shape="rect">
Andrew Nurse</a>, Software Engineer and one of the guys who designed and wrote the &quot;Razor&quot; parser. Of course,
<em>your</em> questions are also asked. Thanks to those of you who posted them!<br /><br />Tune in as we take a razor to &quot;Razor.&quot;<br /><br />Enjoy.  <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:8d5d3e3532ab4a0cb2389dea0042621a">]]></description>
      <comments>http://channel9.msdn.com/Shows/Going+Deep/Andrew-Nurse-Inside-Razor</comments>
      <itunes:summary>ASP.NET&#39;s latest MVC view engine, &amp;quot;Razor,&amp;quot; is optimized for HTML generation using a code-focused templating approach. Razor minimizes the number of characters and keystrokes required in a file, and enables a fast, fluid coding workflow. Unlike most template
 syntaxes, you do not need to interrupt your coding to explicitly denote server blocks within your HTML. The parser is smart enough to infer this from your code. This enables a really compact and expressive syntax which is clean, fast, and fun to type.
How exactly does the &amp;quot;Razor&amp;quot; parser work? What were the design goals? How is it implemented? These are Going Deep questions and we knew exactly who could answer them. Meet

Andrew Nurse, Software Engineer and one of the guys who designed and wrote the &amp;quot;Razor&amp;quot; parser. Of course,
your questions are also asked. Thanks to those of you who posted them!Tune in as we take a razor to &amp;quot;Razor.&amp;quot;Enjoy. </itunes:summary>
      <itunes:duration>3385</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Going+Deep/Andrew-Nurse-Inside-Razor</link>
      <pubDate>Thu, 15 Jul 2010 20:10:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Going+Deep/Andrew-Nurse-Inside-Razor</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/560799_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/560799_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_320_ch9.png" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_85_ch9.png" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_2MB_ch9.wmv" expression="full" duration="3385" fileSize="1278561031" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_ch9.mp3" expression="full" duration="3385" fileSize="27088039" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_ch9.mp4" expression="full" duration="3385" fileSize="582328290" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_ch9.wma" expression="full" duration="3385" fileSize="27386437" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_ch9.wmv" expression="full" duration="3385" fileSize="741972923" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_Zune_ch9.wmv" expression="full" duration="3385" fileSize="477700975" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/9/9/7/0/6/5/AndrewNurseInsideRazor_ch9.wmv" length="741972923" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Charles</dc:creator>
      <itunes:author>Charles</itunes:author>
      <slash:comments>30</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Going+Deep/Andrew-Nurse-Inside-Razor/RSS</wfw:commentRss>
      <category>.NET</category>
      <category>.NET Framework</category>
      <category>ASP.NET MVC</category>
      <category>Parsers</category>
      <category>Programming</category>
      <category>Razor</category>
      <category>WebMatrix</category>
      <category>Web Matrix</category>
    </item>
  <item>
      <title>Hanselminutes on 9 - &quot;Razor,&quot; IIS Express, SQL 4 Compact Edition and VS2010 Tooling with Damian Edwards</title>
      <description><![CDATA[ <p>Scott's in Redmond this week and chats with developer Damian Edwards about&nbsp;&quot;Razor,&quot; IIS Express, SQL 4 Compact Edition and VS2010 Tooling.&nbsp;<br><a href="http://weblogs.asp.net/scottgu/archive/2010/07/06/introducing-webmatrix.aspx" shape="rect">ScottGu</a> recently announced all of these cool new developer tools, and folks at Microsoft are actively working on integration with Visual Studio 2010 and one of those folks is Damian. What's he got to show Scott today?</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:8c263c3c7fa74b379d359dea00a3d716">]]></description>
      <comments>http://channel9.msdn.com/Shows/HanselminutesOn9/Hanselminutes-on-9-Razor-IIS-Express-SQL-4-Compact-Edition-and-VS2010-Tooling-with-Damien-Edwards</comments>
      <itunes:summary> Scott&#39;s in Redmond this week and chats with developer Damian Edwards about&amp;nbsp;&amp;quot;Razor,&amp;quot; IIS Express, SQL 4 Compact Edition and VS2010 Tooling.&amp;nbsp;ScottGu recently announced all of these cool new developer tools, and folks at Microsoft are actively working on integration with Visual Studio 2010 and one of those folks is Damian. What&#39;s he got to show Scott today? </itunes:summary>
      <itunes:duration>1191</itunes:duration>
      <link>http://channel9.msdn.com/Shows/HanselminutesOn9/Hanselminutes-on-9-Razor-IIS-Express-SQL-4-Compact-Edition-and-VS2010-Tooling-with-Damien-Edwards</link>
      <pubDate>Tue, 13 Jul 2010 22:35:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/HanselminutesOn9/Hanselminutes-on-9-Razor-IIS-Express-SQL-4-Compact-Edition-and-VS2010-Tooling-with-Damien-Edwards</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/561013_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/561013_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/3/1/0/1/6/5/HanselminutesOn9RazorTooling_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/1/0/1/6/5/HanselminutesOn9RazorTooling_2MB_ch9.wmv" expression="full" duration="1191" fileSize="163388646" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/1/0/1/6/5/HanselminutesOn9RazorTooling_ch9.mp3" expression="full" duration="1191" fileSize="9534349" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/1/0/1/6/5/HanselminutesOn9RazorTooling_ch9.mp4" expression="full" duration="1191" fileSize="219704320" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/1/0/1/6/5/HanselminutesOn9RazorTooling_ch9.wma" expression="full" duration="1191" fileSize="9650821" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/1/0/1/6/5/HanselminutesOn9RazorTooling_ch9.wmv" expression="full" duration="1191" fileSize="249830207" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/3/1/0/1/6/5/HanselminutesOn9RazorTooling_ch9.wmv" length="249830207" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Scott Hanselman</dc:creator>
      <itunes:author>Scott Hanselman</itunes:author>
      <slash:comments>39</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/HanselminutesOn9/Hanselminutes-on-9-Razor-IIS-Express-SQL-4-Compact-Edition-and-VS2010-Tooling-with-Damien-Edwards/RSS</wfw:commentRss>
      <category>ASP.NET 4</category>
      <category>HanselminutesOn9</category>
      <category>iis7</category>
      <category>Razor</category>
      <category>SQL 2008</category>
      <category>SQL Server 2008</category>
      <category>Visual Studio 2010</category>
    </item>
  <item>
      <title>Simon Calvert &amp; Scott Hunter: WebMatrix and the new Razor Syntax</title>
      <description><![CDATA[
<p>WebMatrix is a new lightweight tool, server, database and Web programming framework. The goal is to&nbsp;provide an easy on-ramp to building Web applications and to provide tools to easily create and customize pre-built applications like WordPress, Umbraco CMS
 and more. <br /><br />WebMatrix Beta:&nbsp;<a shape="rect" href="http://www.microsoft.com/web/webmatrix/" shape="rect">More Information</a> |
<a shape="rect" href="http://www.microsoft.com/web/webmatrix/download/" shape="rect">
Download</a><br /><br />In this video, you'll see demos of:</p>
<ul>
<li>Starting WebMatrix (13:02) </li><li>Downloading &amp; Running Umbraco CMS (13:40 - 21:05) </li><li>SEO and Broken Links report (21:05 - 23:08) </li><li>How to publish a Web site using WebMatrix (23:08 - 24:20&nbsp; </li><li>Building basic Web sites using the new Razor syntax in VBHTML/CSHTML files, including editing HTML, adding headers and footers, database access, HTML forms and more&nbsp;(23:08 - 44:28)
</li><li>Content Helpers - Content Helpers are wrappers for common tasks and 3rd party services, including database access, adding video to a site, captcha, photo processing, Twitter, &nbsp;and more (44:28 - 52:40)
</li><li>Smarty Route - How routing works without explicit configuration and without file extensions (52:40 - 54:44)
</li></ul>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/razor/RSS&WT.dl=0&WT.entryid=Entry:RSSView:033dd52fbb8f460796679dea00a197e5">]]></description>
      <comments>http://channel9.msdn.com/Blogs/Dan/Simon-Calvert--Scott-Hunter-WebMatrix-and-the-new-Razor-Syntax</comments>
      <itunes:summary>
WebMatrix is a new lightweight tool, server, database and Web programming framework. The goal is to&amp;nbsp;provide an easy on-ramp to building Web applications and to provide tools to easily create and customize pre-built applications like WordPress, Umbraco CMS
 and more. WebMatrix Beta:&amp;nbsp;More Information |

DownloadIn this video, you&#39;ll see demos of: 

Starting WebMatrix (13:02) Downloading &amp;amp; Running Umbraco CMS (13:40 - 21:05) SEO and Broken Links report (21:05 - 23:08) How to publish a Web site using WebMatrix (23:08 - 24:20&amp;nbsp; Building basic Web sites using the new Razor syntax in VBHTML/CSHTML files, including editing HTML, adding headers and footers, database access, HTML forms and more&amp;nbsp;(23:08 - 44:28)
Content Helpers - Content Helpers are wrappers for common tasks and 3rd party services, including database access, adding video to a site, captcha, photo processing, Twitter, &amp;nbsp;and more (44:28 - 52:40)
Smarty Route - How routing works without explicit configuration and without file extensions (52:40 - 54:44)

</itunes:summary>
      <itunes:duration>3340</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/Dan/Simon-Calvert--Scott-Hunter-WebMatrix-and-the-new-Razor-Syntax</link>
      <pubDate>Tue, 06 Jul 2010 19:44:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/Dan/Simon-Calvert--Scott-Hunter-WebMatrix-and-the-new-Razor-Syntax</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/559706_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/559706_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_320_ch9.png" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_85_ch9.png" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_2MB_ch9.wmv" expression="full" duration="3340" fileSize="664897594" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_ch9.mp3" expression="full" duration="3340" fileSize="26721595" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_ch9.mp4" expression="full" duration="3340" fileSize="269587078" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_ch9.wma" expression="full" duration="3340" fileSize="27013941" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_ch9.wmv" expression="full" duration="3340" fileSize="393604279" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_Zune_ch9.wmv" expression="full" duration="3340" fileSize="321844331" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/6/0/7/9/5/5/WebMatrixAndRazor_ch9.wmv" length="393604279" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Dan Fernandez</dc:creator>
      <itunes:author>Dan Fernandez</itunes:author>
      <slash:comments>14</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/Dan/Simon-Calvert--Scott-Hunter-WebMatrix-and-the-new-Razor-Syntax/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>HTML</category>
      <category>Razor</category>
      <category>Web</category>
      <category>WebMatrix</category>
    </item>    
</channel>
</rss>