Solved

problem with page title when using masterpages

Posted on 2011-03-15
4
323 Views
Last Modified: 2013-12-17
Hi.

My masterpage writes empty <title> tags on every page which has reference to the master page.

Does anybody know what is wrong?
I´ve made a very simple test project which can be downloaded here: www.movievizion.dk/upload/titletest.rar

0
Comment
Question by:bongii
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 3

Expert Comment

by:omnimaven
ID: 35137931
In your master page, remove the line:

    <title></title>
0
 
LVL 3

Accepted Solution

by:
omnimaven earned 500 total points
ID: 35138123
Actually, remove

<title>default</title>

from your Default.aspx page.

If you want to add a title to your page, do it on the first line:

<%@ Page Title="My Page Title" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
0
 

Author Comment

by:bongii
ID: 35138207
Thank you.

Can you explain why the Title is rendered like this in the code:

<head><title>
      test
</title>
</head>

Is it possible to get the title rendered as:
<head>
<title>test</title>
</head>

 Render code
0
 
LVL 3

Expert Comment

by:omnimaven
ID: 35138370
That is just the way the page gets rendered. I don't know if you are going to be able to change that.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question