<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Adding a View</title><link>http://www.asp.net</link><pubDate>Sun, 13 May 2012 03:09:05 GMT</pubDate><generator>umbraco</generator><description>Comments for Adding a View</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/27651" rel="self" type="application/rss+xml" /><item><title>Comment Posted by glm409</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Fri, 15 Apr 2011 18:59:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012828</guid><description><![CDATA[ <p>I get the following undefined references for DbContext and DbSet evening I have the following using statements as described in the tutorial.  Anybody have ideas?</p><p></p><p>using System;</p><p>using System.Data;</p><p>using System.Data.Entity;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Web;</p><p></p><p>Error	1	The type or namespace name &#39;DbContext&#39; could not be found (are you missing a using directive or an assembly reference?)	C:\Users\Greg\documents\visual studio 2010\Projects\MvcMovie1\MvcMovie1\Models\Movie.cs	18	35	MvcMovie1</p><p>Error	2	The type or namespace name &#39;DbSet&#39; could not be found (are you missing a using directive or an assembly reference?)	C:\Users\Greg\documents\visual studio 2010\Projects\MvcMovie1\MvcMovie1\Models\Movie.cs	20	16	MvcMovie1</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/glm409.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Tomas.Ruksenas</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Sat, 16 Apr 2011 06:27:25 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012834</guid><description><![CDATA[ <p>@glm409</p><p>You are missing EntityFramework.dll. Just download .NET framework 4.1 and install it. This worked perfectly for me.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Tomas.Ruksenas.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mengyuancn</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Fri, 06 May 2011 20:37:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013093</guid><description><![CDATA[ <p>smart code,so coll!</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/mengyuancn.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jerrychen11</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Wed, 01 Jun 2011 18:50:45 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013362</guid><description><![CDATA[ <p>ViewBag is a nice object. </p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/jerrychen11.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by walia_jagwinder</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Sun, 03 Jul 2011 01:47:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013667</guid><description><![CDATA[ <p>very good explanation</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/walia_jagwinder.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by janoulle</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 04 Jul 2011 11:20:24 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013679</guid><description><![CDATA[ <p>I&#39;m confused. I have Visual Studio 2010 from DreamSpark and I following these installation instructions: <a rel="nofollow" href="http://www.microsoft.com/web/gallery/install.aspx?appsxml=&amp;appid=VS2010SP1Pack" target="_blank">www.microsoft.com/</a></p><p></p><p>This is what my App looks like: <a rel="nofollow" href="http://min.us/mejBNmr#2" target="_blank">min.us/</a> which is what your screenshots for adding a controller look like.</p><p></p><p>My layout template is missing and I only have _ViewStart.cshtml and Web.config in my Shared folder (<a rel="nofollow" href="http://min.us/mejBNmr#3)." target="_blank">min.us/</a> I would appreciate any pointers on where to download the rest of the files or how to add these files to my project. </p><p></p><p>Thanks!</p><p>Jane</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/janoulle.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by janoulle</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 04 Jul 2011 11:38:39 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013680</guid><description><![CDATA[ <p>Anddd, the mistake was mine. :) Doubleclicking the Shared folder showed _Layout.cshtml and Error.cshtml and checking the Explorer folder confirmed that I wasn&#39;t missing any files. I think this is why my localhost:xxx/HelloWorld page is blank: <a rel="nofollow" href="http://min.us/mejBNmr#4" target="_blank">min.us/</a> I&#39;m adding my code now. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/janoulle.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by janoulle</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 04 Jul 2011 14:10:04 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013682</guid><description><![CDATA[ <p>Last comment: I started off on the wrong foot. Instead of creating an &quot;Internet Application&quot;, I created an &quot;Empty&quot; one which is why I was missing the files. Case closed. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/janoulle.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by baskarjoshi</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 04 Jul 2011 21:26:12 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013689</guid><description><![CDATA[ <p>Right click context menu onIndex() method works only when the return type is ActionResult..does not work for our example string Index(). Am I missing something</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/baskarjoshi.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by baskarjoshi</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 04 Jul 2011 21:30:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013690</guid><description><![CDATA[ <p>Ignore my earlier commment..as I am a newbie to MVC..Thanks its a great tutorial</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/baskarjoshi.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sammysounder</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Tue, 26 Jul 2011 17:28:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013841</guid><description><![CDATA[ <p>Can I get a single controller action to render different views?</p><p></p><p>Do we really have to use _Layout as our only top-level template?  Can we use different top-level templates somehow?</p><p></p><p>Thanks!</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/sammysounder.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by unknownx</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Sun, 31 Jul 2011 17:22:15 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013886</guid><description><![CDATA[ <p>You cannot add the View by right-click inside the Welcome method if you don&#39;t change it to: </p><p></p><p>public ActionResult Welcome(string name, int numTimes = 1)</p><p></p><p>from </p><p></p><p>public string Welcome(string name, int numTimes = 1)</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/unknownx.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by vishal4043</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Wed, 17 Aug 2011 01:42:23 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013975</guid><description><![CDATA[ <p>ViewBag.Title is not allowed in my IDE VS2010.</p><p></p><p>Reply me on vishal_4043@msn.com too.</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/vishal4043.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sweta2408</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Thu, 01 Sep 2011 16:28:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014104</guid><description><![CDATA[ <p>amazing ... self explainatory</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/sweta2408.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by seci</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Thu, 20 Oct 2011 11:04:01 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014469</guid><description><![CDATA[ <p>Just one minor thing: Why the &quot;Hello&quot; is passed to the view? It should not, it is part of the display and not the content - at least IMHO. Or do I have too much teaching experience? :-)</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/seci.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Sat, 12 Nov 2011 18:32:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014616</guid><description><![CDATA[ <p>seci: Why the &quot;Hello&quot; is passed to the view?</p><p>This is just to show how data is past from the controller to view. You are correct in general, but it&#39;s OK for a simple example.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by lokanadam</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 30 Jan 2012 21:45:59 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014745</guid><description><![CDATA[ <p>simply a great tutorial for a beginner !</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/lokanadam.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by neonemesis15</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Sat, 04 Feb 2012 13:00:58 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014771</guid><description><![CDATA[ <p>Hi, Rick. Thank you for this tutorial is very well.</p><p>only short update in this line code:</p><p>@{    ViewBag.Title = &quot;Welcome&quot;;}</p><p>&lt;h2&gt;Welcome&lt;/h2&gt;</p><p>&lt;ul&gt;    @for (int i=0; i &lt; ViewBag.NumTimes; i++) { </p><p>      &lt;li&gt;@ViewBag.Message&lt;/li&gt;  } </p><p>&lt;/ul&gt;</p><p>-----------------------------------------------------</p><p>Must:</p><p>@{ ViewBag.Title = &quot;Welcome&quot;; }</p><p>&lt;h2&gt;Welcome &lt;/h2&gt; </p><p>@{ for (int i = 0; i &lt; ViewBag.NumeTimes; i++)</p><p>          { &lt;li&gt;@ViewBag.Message&lt;/li&gt;    }</p><p>    }</p><p>You can make this update in the page? </p><p>Thank you </p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/neonemesis15.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jonesyfr</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Sun, 05 Feb 2012 03:38:43 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014774</guid><description><![CDATA[ <p>Nice and easy explanation for a beginner. Excellent, thanks. </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/jonesyfr.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by arty3381</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 20 Feb 2012 05:31:22 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014884</guid><description><![CDATA[ <p>Will not let me add view as Index because index.cshtml already exists :(</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/arty3381.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by arty3381</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Mon, 20 Feb 2012 05:38:49 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014885</guid><description><![CDATA[ <p>Forget that, was using the wrong class :P noobville</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/arty3381.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by joeynicola</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Tue, 21 Feb 2012 00:43:17 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014892</guid><description><![CDATA[ <p>Any one can tell me why i can&#39;t see the whole sample code what rick showed?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/joeynicola.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by venkatmca008</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Fri, 06 Apr 2012 23:08:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015271</guid><description><![CDATA[ <p>fantastic article....thanks....</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/venkatmca008.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by vksworld</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Wed, 02 May 2012 07:12:23 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015443</guid><description><![CDATA[ <p>That was an excellent post Rick... </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/vksworld.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mishra.bhupesh</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-view</link><pubDate>Sun, 13 May 2012 03:09:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015493</guid><description><![CDATA[ <p>got it.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/mishra.bhupesh.jpg?forceidenticon=false&amp;dt=635050641000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>