Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

cshtml page title

// Create a _Layout.cshtml under your pages directory
// Make sure you have a head and title tags specified in there.

// In your page set the title like so:
@{
   ViewBag.Title = "My View's Title";
   Layout = "~/Views/Shared/_Layout.cshtml";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cshtml #page #title
ADD COMMENT
Topic
Name
5+1 =