problem with page title when using masterpages

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

Jesper ChristensenProgrammerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
omnimavenConnect With a Mentor Commented:
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
 
omnimavenCommented:
In your master page, remove the line:

    <title></title>
0
 
Jesper ChristensenProgrammerAuthor Commented:
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
 
omnimavenCommented:
That is just the way the page gets rendered. I don't know if you are going to be able to change that.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.