Geeks With Blogs

News Awarded Microsoft MVP C#.NET - 2007, 2008 and 2009


I am born in Bangladesh and currently live in Melbourne, Australia. I am a Microsoft Certified Application Developer MCAD Chartered Member (C# .Net)and born in Bangladesh.
I am founder and Chief Executive Officer of
Simplexhub, a highly experienced software development company based in Melbourne Australia and Dhaka, Bangladesh. Co-founder and core developer of Pageflakes www.pageflakes.com.
Simplexhub, is on its mission to build a smart virtual community in Bangladesh and recently launched beta realestatebazaar.com.bd an ASP.NET MVC application written in C#.NET.


Some of My Articles
Flexible and Plugin based .Net Application..
Mass Emailing Functionality with C#, .NET 2.0, and Microsoft® SQL Server 2005 Service Broker'
Write your own Code Generator or Template Engine in .NET
Shahed Khan blog

Dynamically changing the Title of Asp.Net Pages:

<HTML>
<HEAD>
<asp:PlaceHolder id="titlePlaceHolder" runat="server" />
</HEAD> <BODY>
...
...
...
</BODY></HTML>

In the codebehind

protected PlaceHolder titlePlaceHolder;

private void Page_Load(object sender, System.EventArgs e)
{
System.Web.UI.HtmlControls.HtmlGenericControl PageTitle= new System.Web.UI.HtmlControls.HtmlGenericControl("title");
titlePlaceHolder.Controls.Add(PageTitle);
PageTitle.InnerHtml="The Title You Want";

}

Posted on Thursday, December 15, 2005 9:05 PM | Back to top


Comments on this post: Dynamically changing the Title of Asp.Net Pages

# re: Dynamically changing the Title of Asp.Net Pages
Requesting Gravatar...
You could also do:

<title runat=server id=theTitle />

Then declare the title as a HTMLGenericControl in the code behind.

theTitle.innerHTML = "My New Title";
Left by Kyle on Dec 16, 2005 1:00 AM

# re: Dynamically changing the Title of Asp.Net Pages
Requesting Gravatar...
In ASP.NET 2.0, this is simplified to

Page.Title = "whatever";

in the code behind.
Left by mskoolaid on Dec 16, 2005 2:35 AM

Your comment:
 (will show your gravatar)


Copyright © Shahed Khan | Powered by: GeeksWithBlogs.net