Finished Chapt2: Controllers
parent
ccba65247b
commit
8f67d3f299
|
@ -26,5 +26,11 @@ namespace MvcMusicStore.Controllers
|
|||
|
||||
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\Contact.cshtml" />
|
||||
<Content Include="Views\Home\Index.cshtml" />
|
||||
<Content Include="Views\Home\Sample.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
|
|
@ -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…
Reference in New Issue