473,378 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Changing the pages title

Hi all,

is there a way to change the title of a page dynamically from code-behind?

Regards,
Michael
Jan 11 '06 #1
3 1487
I usually use <title><%= this._title %></title> to workaround. Just set the
_title(string type of course) to set the title of the page.

This works because Render() is always the last method to run to the cycle.

In .NET 2.0, you can set the Page.Title property directly.

"Michael Groeger" <go*********@web.de> ¼¶¼g©ó¶l¥ó·s»D:OX*************@TK2MSFTNGP09.phx.gb l...
Hi all,

is there a way to change the title of a page dynamically from code-behind?

Regards,
Michael

Jan 11 '06 #2
I use
<title runat="server" id="title" />

protected HtmlGenericControl title;

title.InnerText = "whatever";

Karl
--
http://www.openmymind.net/

"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:OF**************@TK2MSFTNGP10.phx.gbl...
I usually use <title><%= this._title %></title> to workaround. Just set the
_title(string type of course) to set the title of the page.

This works because Render() is always the last method to run to the cycle.

In .NET 2.0, you can set the Page.Title property directly.

"Michael Groeger" <go*********@web.de>
¼¶¼g©ó¶l¥ó·s»D:OX*************@TK2MSFTNGP09.phx.gb l...
Hi all,

is there a way to change the title of a page dynamically from
code-behind?

Regards,
Michael


Jan 11 '06 #3
Oops. I thought the HtmlGenericControl only affects tags in <body>. :P

Have learnt new thing now...

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> ¼¶¼g©ó¶l¥ó·s»D:eW*************@TK2MSFTNGP09.phx.gb l...
I use
<title runat="server" id="title" />

protected HtmlGenericControl title;

title.InnerText = "whatever";

Karl
--
http://www.openmymind.net/

"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:OF**************@TK2MSFTNGP10.phx.gbl...
I usually use <title><%= this._title %></title> to workaround. Just set
the _title(string type of course) to set the title of the page.

This works because Render() is always the last method to run to the
cycle.

In .NET 2.0, you can set the Page.Title property directly.

"Michael Groeger" <go*********@web.de> ¼¶¼g©ó¶l¥ó·s»D:OX*************@TK2MSFTNGP09.phx.gb l...
Hi all,

is there a way to change the title of a page dynamically from
code-behind?

Regards,
Michael



Jan 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: b | last post by:
When I create chm with docbook I have most of the pages on one file. So, when I search for "Linux" page begins with "Sample HTML" .... I get the page with several pages in one. Can this be...
2
by: Xam | last post by:
Hi everybody My web site pops out a new window, which has no address bar, buttons, etc just the titlebar and scrollbar are the accepted features. The thing is this pop-up window goes to...
7
by: Stefan Finzel | last post by:
Hi, is there a way to change the display property on Windows Mobile 2003 SE Mobile/Pocket Internet Explorer? See following example. Please note: visibilty property has the same problem. Is...
31
by: Greg Scharlemann | last post by:
Given some recent success on a simple form validation (mainly due to the kind folks in this forum), I've tried to tackle something a bit more difficult. I'm pulling data down from a database and...
4
by: z f | last post by:
Hi, if i use a base class for my pages PageBase inherits system.web.page can i control the title of my inheriting pages without midifying the pages directly or adding a runat=server to the title...
2
by: John Dalberg | last post by:
The below html validates correctly on w3.org's html validator when the file has an html extension. When the same file gets an aspx extension, I get the error below from the validator. This tells me...
2
by: lprisr | last post by:
Hi, I have double byte characters in the content that I am returning using Web Services. However, the encoding in the xml file returned by Web Services is utf-8 and I am unable to read the...
1
by: Yuk Tang | last post by:
Leading on from a recent topic, "How does child class access parent's variables", I would like to ask, what's the most elegant way of changing a parent/grandparent/great-grandparent's property? ...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.