Finished Chapt2: Controllers
This commit is contained in:
parent
ccba65247b
commit
8f67d3f299
@ -26,5 +26,11 @@ namespace MvcMusicStore.Controllers
|
|||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ActionResult Sample()
|
||||||
|
{
|
||||||
|
ViewBag.Message = "Hello World. Welcome to ASP.NET MVC!";
|
||||||
|
return View("Sample");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -163,6 +163,7 @@
|
|||||||
<Content Include="Views\Home\About.cshtml" />
|
<Content Include="Views\Home\About.cshtml" />
|
||||||
<Content Include="Views\Home\Contact.cshtml" />
|
<Content Include="Views\Home\Contact.cshtml" />
|
||||||
<Content Include="Views\Home\Index.cshtml" />
|
<Content Include="Views\Home\Index.cshtml" />
|
||||||
|
<Content Include="Views\Home\Sample.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
|
17
MvcMusicStore/Views/Home/Sample.cshtml
Normal file
17
MvcMusicStore/Views/Home/Sample.cshtml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
@{
|
||||||
|
ViewBag.Title = "Sample";
|
||||||
|
}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head><title>Sample View</title></head>
|
||||||
|
<body>
|
||||||
|
<p>
|
||||||
|
This is sample view. It's not much to look at,
|
||||||
|
but it gets the job done.
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user