This project is read-only.

How do I inject the title tag?

Topics: ASP.NET 2.0, Themes
Feb 8, 2009 at 10:13 PM
Edited Feb 8, 2009 at 10:14 PM
I have created a separate aspx page(similar to the contact.aspx ) using my site.master file…can anybody tell me how to inject the title info?

Currently I am getting an empty title tag (<title></title>)


--------------------------------------source code-------------------------------------------

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="News.aspx.cs" Inherits="News" %>
<%@ Import Namespace="BlogEngine.Core" %>
<%@ Register src="~/User controls/NewsRSS.ascx" tagname="NewsRSS" tagprefix="tnn2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphBody" Runat="Server">
<div id="newscontent">
    <div id="newscontent-ads">
            <div id="rssbanner">
                <div id="rsstitle">heading</div>
                <div id="rssimg"><img src="pics/logos/newslogo.gif" height=25 width=111></div>
            <tnn2:NewsRSS ID="NewsRSS1" RssType="bbc" runat="server" />        

Feb 9, 2009 at 1:37 AM
You can add it as an attribute in the Page directive, like below:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="News.aspx.cs" Inherits="News" Title="My Title" %>

If you have the 'Use blog name in page titles' option checked on the Settings tab in the control panel, then the title will end up being "Name of the blog | My Title".  If you uncheck the option, then the title will just be "My Title".
Feb 9, 2009 at 9:16 AM

You are the man! title tag is working now.

P.S: I had a look at the contact.aspx but couldn't notice a title attribute within the page directive.

Feb 9, 2009 at 10:21 AM
 i am very new to and i have started a blog.but i am facing difficulties in adding images to my blog..can anyone tell me how to do it?

Feb 9, 2009 at 12:20 PM
I use windows live write to post my posts. (UI is similar to word)

Feb 9, 2009 at 2:37 PM

thanx alot