Asp.net mvc 4 show title of the page in tab of browser

Asp.net mvc 4 show title of the page in tab of browser,asp.net-mvc-4,browser,Asp.net Mvc 4,Browser,I have created a website in MVC4 and i want to show the title of my page in the Browser tab instead of the URL of browser. Please let me know what exactly needs to be done. Please click on below URL for references:- http://incubatizealpha.azurewebsites.net/User/Login

I have created a website in MVC4 and i want to show the title of my page in the Browser tab instead of the URL of browser. Please let me know what exactly needs to be done. Please click on below URL for references:- http://incubatizealpha.azurewebsites.net/User/Login


#1

you can follow default routine for displaying title in ASP.NET MVC.

in _Layout.cshtml

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Your SiteName | @ViewBag.Title</title>
        .
        .

in other pages just set ViewBag.Title. for example login page

@model LoginModel
@{
    ViewBag.Title = "Login page";
}

#2

Hello @17Coder. You aren't improving formatting by turning the whole post into a block quote. Please only use block quotes on actual quotes. For more details, see our editing help: stackoverflow.com/editing-help

#3

Good job on spotting that invalid edit @Jongware.