?
Solved

problem with page title when using masterpages

Posted on 2011-03-15
4
Medium Priority
?
327 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

649 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