473,396 Members | 1,726 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,396 software developers and data experts.

setting page title worked, now doesnt?

Weird problem...

all my pages use C# codebehind to set the <title> tag of the pages. As
follows...

in hmtl.. <title id="PageTitle"></title>

in code..

protected System.Web.UI.HtmlControls.HtmlGenericControls PageTitle;

and then

PageTitle.InnerHtml = "text";

It works on all pages, and it did work on this one. But then it just stopped
on this page. Still works on all the others... any ideas what's happening?!?!

ta
Dan
Nov 18 '05 #1
3 1115
you need a runat=server in the title tag
Nov 18 '05 #2
I've had this problem on <head>, where the "runat=server" goes away when you
toggle to design mode. Not sure if this is a reported problem, but in my case
I switched to always have a placeholder in <head>, to which in code-behind
I'll add my title, styles, etc.

"Dan Nash" wrote:
Weird problem...

all my pages use C# codebehind to set the <title> tag of the pages. As
follows...

in hmtl.. <title id="PageTitle"></title>

in code..

protected System.Web.UI.HtmlControls.HtmlGenericControls PageTitle;

and then

PageTitle.InnerHtml = "text";

It works on all pages, and it did work on this one. But then it just stopped
on this page. Still works on all the others... any ideas what's happening?!?!

ta
Dan

Nov 18 '05 #3
Thanks guys - re-adding runat="server" has sorted the prob! I can sleep
soundly tonight, knowing my page isn't buggered.!!

Thanks a lot :o)

"Dan Nash" wrote:
Weird problem...

all my pages use C# codebehind to set the <title> tag of the pages. As
follows...

in hmtl.. <title id="PageTitle"></title>

in code..

protected System.Web.UI.HtmlControls.HtmlGenericControls PageTitle;

and then

PageTitle.InnerHtml = "text";

It works on all pages, and it did work on this one. But then it just stopped
on this page. Still works on all the others... any ideas what's happening?!?!

ta
Dan

Nov 18 '05 #4

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

Similar topics

6
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the...
4
by: dmiller23462 | last post by:
I'm trying to create a submission page for users to request PC/LAN Access....If they select "Yes" in the field asking about if they need Non Standard Software, I want several other HTML fields to...
5
by: mark | r | last post by:
i use document.getelementbyid('id').style.colour= a lot anyone know how to set the style of the link in the following code <li id="tab1"><a href="#">moo</a></li> because setting the colour of...
13
by: Jim Carlock | last post by:
I have over a hundred pictures I would like to present. Is it practical to create and parse an array of pictures, picture paths, et al using server-side scripting to accomplish this? I...
1
by: fugaki | last post by:
Hi everyone I'm learning asp, and i downloaded this script to teach me how to post form data from a webpage to an access database. I put it on the server so i could make sure that it worked, and...
5
by: JSha | last post by:
I have button which when clicked does a popup window which is opened using showmodaldialog(xyz.aspx, dialogarguments)... the xyz.aspx page has the title set as.... <title> ABCD </title> now...
1
by: soluvah | last post by:
Hello Folks, Been trying to widen my site's body from "779" to "1000" so it almost fills the window. IE 7 on windows XP just dismantles the pages and leaves wide gaps between the left column and...
4
by: Buddha | last post by:
Hello, I posted this on two forums, without too much help .. and I am kinda stuck in this. I need to refresh the parent page from the second child window which is opened by the first child and...
3
by: malcsman | last post by:
Hi there, I think it's best to explain things first.. (it's a sermons archive) I manage a static page which I'd like to automate. This page is an archive that lists mp3s and their notes(pdf) as...
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:
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.