How do I inject the title tag?

Topics: ASP.NET 2.0, Themes
Feb 8, 2009 at 9:13 PM
Edited Feb 8, 2009 at 9: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>)

thanks.

--------------------------------------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>
            </div>
            <tnn2:NewsRSS ID="NewsRSS1" RssType="bbc" runat="server" />        
    </div>
</div>
</asp:Content>
----------------------------------------------------------------------------------

Coordinator
Feb 9, 2009 at 12: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 8:16 AM
BenAmada,

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.

thanks
Feb 9, 2009 at 9:21 AM
hi
 i am very new to blogengine.net 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?

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

http://windowslivewriter.spaces.live.com/

Feb 9, 2009 at 1:37 PM
@ikaran

thanx alot