Link to home
Start Free TrialLog in
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#
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

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

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
My solution works