<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Resources to learn MVC 3</title><link>http://blogs.msdn.com/b/jaskis/archive/2012/04/01/resources-to-learn-mvc-3.aspx</link><description>Step by Step tutorials and PluralSight Videos covering MVC 3 
 http://www.asprangers.com/post/2012/03/31/Resources-to-learn-MVC-3.aspx 
 Read More</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Resources to learn MVC 3</title><link>http://blogs.msdn.com/b/jaskis/archive/2012/04/01/resources-to-learn-mvc-3.aspx#10291058</link><pubDate>Thu, 05 Apr 2012 10:31:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10291058</guid><dc:creator>mitesh487</dc:creator><description>&lt;p&gt;I am having a requirement where i want to load my .cshtml file from the database. My .cshtml file comes from the database as filestream which I am able to parse as normal string which looks as below:&lt;/p&gt;
&lt;p&gt;&amp;lt;h2&amp;gt;SecondPage You are from .cshtml Page&amp;lt;/h2&amp;gt;&lt;/p&gt;
&lt;p&gt;@{Html.RenderAction(&amp;quot;Left&amp;quot;, &amp;quot;Left&amp;quot;);}&lt;/p&gt;
&lt;p&gt;I need to show this web page for which i am trying to parse the .cshtml file as&lt;/p&gt;
&lt;p&gt;// my SP which will return byte array from database&lt;/p&gt;
&lt;p&gt;byte[] objContext = byte[])objdbmcptestEntities.GetFile(1).SingleOrDefault().FileData;&lt;/p&gt;
&lt;p&gt;var template = System.Text.Encoding.ASCII.GetString(objContext);&lt;/p&gt;
&lt;p&gt;//var template = &amp;quot;@{ @:The day is: @DateTime.Now.DayOfWeek. It is a &amp;lt;b&amp;gt;great&amp;lt;/b&amp;gt; day!}&amp;quot;;&lt;/p&gt;
&lt;p&gt;//This code works fine&lt;/p&gt;
&lt;p&gt;//The code below does`t work&lt;/p&gt;
&lt;p&gt;var template = &amp;quot;Hello @Model.Name! Welcome to Razor!&amp;lt;h2&amp;gt;SecondPage You are from code behind&amp;lt;/h2&amp;gt;&amp;lt;div&amp;gt;@Model.Name&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;@{Html.RenderAction(\&amp;quot;Left\&amp;quot;, \&amp;quot;Left\&amp;quot;);}&amp;lt;/div&amp;gt;&amp;quot;;&lt;/p&gt;
&lt;p&gt;return Razor.Parse(template, new { Name = &amp;quot;World&amp;quot; });&lt;/p&gt;
&lt;p&gt;Please give me some solution ASAP.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10291058" width="1" height="1"&gt;</description></item></channel></rss>