Solved

problem with page title when using masterpages

Posted on 2011-03-15
4
322 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

838 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