I am following the article tr333 recommended here
Has anybody walked through the article? I am here http://www.howmvcworks.net/GettingStarted/CreatingAView and on step 3 below:
Step 3: Create a Controller Action for the View
So now I have my view. I now need to tell its controller to return it when visiting the proper url. So I go to my "ZooController" and added the following:
public ActionResult LookAtTheMonkey()
{
return View();
}
Now that this is done, if you go to "/Zoo/LookAtTheMonkey" you will get a rather bland page...but a page nonetheless.
When he says, "if you go to '/Zoo/LookAtTheMonkey'..." go to it how? If I hit go it says the resource or one of its dependencies isn't found, but the page is right here in Views/Zoo:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
LookAtTheMonkey
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>LookAtTheMonkey</h2>
</asp:Content>




Reply With Quote