Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 4-May-14 0:36am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Add something between <title> and </title> in the header of your web page!
  Permalink  
Comments
S.Rajendran from Coimbatore at 4-May-14 5:49am
   
I did like this in my master page:
<head runat="server">
<title>Mytitle</title>
- no effect
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Comments
Kornfeld Eliyahu Peter at 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)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

In ASP.Net MVC set the Viewbag.Title.
E.g.
<title>@ViewBag.Title</title>
@{
     ViewBag.Title = "Page";
}
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 220
2 DamithSL 190
3 Raul Iloc 185
4 Richard MacCutchan 175
0 OriginalGriff 5,130
1 DamithSL 4,197
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 4 May 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100