Click here to Skip to main content
15,885,127 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
If I run my project, in the browser tab, I could see the name appearing as 'Untitled Page'.
How to make my project name to appear at browser tab instead of that 'untitled page'.
Thanks.
Posted

Add something between <title> and </title> in the header of your web page!
 
Share this answer
 
Comments
S.Rajendran from Coimbatore 4-May-14 5:49am    
I did like this in my master page:
<head runat="server">
<title>Mytitle</title>
- no effect
As you have used Master Page, the Solution #1 won't work.
You need to give the title on every content page.

See the very first line of your content page.
<![CDATA[<%@ Page Title= "About" Language="C#" MasterPageFile="" %>]]>


-KR
 
Share this answer
 
Comments
Kornfeld Eliyahu Peter 4-May-14 6:07am    
It's true that my solution won't work for master-page (as there is no title tag in content page), but there is no need to declare @Page Title on every page! If OP leaves @Page Title empty (as it is by default) the page will be displayed with master-page's title...

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="WebApplication1.Site" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Master</title>

--- and ---

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master"

This case will display 'Master' as the title of the content page...(You can remove totally the Title attribute also)
In ASP.Net MVC set the Viewbag.Title.
E.g.
<title>@ViewBag.Title</title>
@{
     ViewBag.Title = "Page";
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900