Avatar of mmalik15
mmalik15

asked on 

Content page title not working in asp.net

Hi experts,

For some reason my content page title which i specify in the content page like this

<%@ Page Title="Life in the UK - About Test" Language="C#" MasterPageFile="~/PL/MasterPageGenericWithSideBar.master"
    AutoEventWireup="true" CodeFile="AboutTest.aspx.cs" Inherits="PL_AboutTest" %>

is not working. Master page title is showing in the browsers title  bar. Any ideas?

I m using vs 2010 with c#
C#ASP.NET

Avatar of undefined
Last Comment
mmalik15
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Can ou post how your master page defines title?

Note: In the mean time, an aspx alternative is shown here:
http://stackoverflow.com/questions/326628/asp-net-mvc-view-with-master-page-how-to-set-title
(It basically defines a content holder that can be overwritten by the content page)
Avatar of mmalik15
mmalik15

ASKER

Please see attached the master page head element
<head>
  
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8" />
    <meta name="cache-control" content="no-cache" />
    <meta name="language" content="en" />
    <title>Home - Life in the UK</title>
    <meta name="keywords" content="Home" />
    <meta name="description" content="Home" />
    <link href='<%= ResolveClientUrl("~/PL/Skins/MyCustomSkin/Button.MyCustomSkin.css") %>' rel="stylesheet" media=all type="text/css" />
   <link type="text/css" rel="stylesheet" media="all" href='<%= ResolveClientUrl("~/PL/CSS/styles.css") %>' />
    <link type="text/css" rel="stylesheet" media="all" href='<%= ResolveClientUrl("~/PL/CSS/ac.css") %>' />
   <%-- <link type="text/css" rel="stylesheet" media="all" href="http://localhost/LifeInTheUK/PL/CSS/Styles.css" />
    <link type="text/css" rel="stylesheet" media="all" href="http://localhost/LifeInTheUK/PL/CSS/ac.css" />--%>


</head>

Open in new window

and the content page title
<%@ Page Title="Life in the UK - About Test" Language="C#" MasterPageFile="~/PL/MasterPageGenericWithSideBar.master"
    AutoEventWireup="true" CodeFile="AboutTest.aspx.cs" Inherits="PL_AboutTest" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

Open in new window

Avatar of mmalik15
mmalik15

ASKER

I still don't understand why the content page title is not appearing and maste page title keeps coming while viewing the content pages
ASKER CERTIFIED SOLUTION
Avatar of mmalik15
mmalik15

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of mmalik15
mmalik15

ASKER

My solution works
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo