Page Title

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

I have a "Master" page and I have 2 pages created from that master.

I want my page title to change with each page.

If I do this in the master

<head runat="server">
<title>My Home Page</title>


Is there a way I can "reference" the title tag in each aspx.page that uses
the master?

Or do I have to create the "Maste Object" and change the title on "Page
load"

Thanks

Miro
 
When you create a page that uses amaster page you set the Title for
the content page in the first line of the content page with the Page
"Title" property. Like the following:

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

If you don't supply a Page Tile, the Title used in the Master Page
will show. If you supply this page title, it will override the master
page title.


Andrew
 
Thank you Andrew.

I started googling and found way more complictated results...and knew there
had to be an easier way.

Worked like a charm.

Cheers'

Miro
 
Back
Top