[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Content page title not working in asp.net

Posted on 2011-10-02
5
Medium Priority
?
433 Views
Last Modified: 2012-06-27
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#
0
Comment
Question by:mmalik15
  • 4
5 Comments
 
LVL 36

Expert Comment

by:Miguel Oz
ID: 36900732
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)
0
 

Author Comment

by:mmalik15
ID: 36903543
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

0
 

Author Comment

by:mmalik15
ID: 36903548
I still don't understand why the content page title is not appearing and maste page title keeps coming while viewing the content pages
0
 

Accepted Solution

by:
mmalik15 earned 0 total points
ID: 36948068
the following did work

<script type="text/javascript">
    document.title = "Life in the UK Test-Book";
</script>
0
 

Author Closing Comment

by:mmalik15
ID: 36975287
My solution works
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

873 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