473,325 Members | 2,608 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,325 software developers and data experts.

dynamic page title

I'm interested in displaying a dynamic page title, rather than the static
html <title>My Page</title>. In a previous posting, I had seen a suggestion
of making the title into a server control using syntax like:
<TITLE id="objTitle" runat="server" />

However, this works for a while, but VS.NET always eventually removes the
runat attribute, and my code bombs. One reason might be that it isn't
included in the <form> tag?? Can the form tag be moved to begin above the
header?? Any suggestions?

Thanks in advance.

Mark
Nov 18 '05 #1
5 3597
I thought that bug that removes runat="server" had been fixed. Are you using
the latest service pack for VS.NET?

"Mark" wrote:
I'm interested in displaying a dynamic page title, rather than the static
html <title>My Page</title>. In a previous posting, I had seen a suggestion
of making the title into a server control using syntax like:
<TITLE id="objTitle" runat="server" />

However, this works for a while, but VS.NET always eventually removes the
runat attribute, and my code bombs. One reason might be that it isn't
included in the <form> tag?? Can the form tag be moved to begin above the
header?? Any suggestions?

Thanks in advance.

Mark

Nov 18 '05 #2
I am using Microsoft .NET Framework 1.1, Version 1.1.4322 SP1, with VS.NET
2003 Enterprise Architect. (Version 7.1.3088)

Any other ideas?

Thanks in advance.

Mark

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:3B**********************************@microsof t.com...
I thought that bug that removes runat="server" had been fixed. Are you using the latest service pack for VS.NET?

"Mark" wrote:
I'm interested in displaying a dynamic page title, rather than the static html <title>My Page</title>. In a previous posting, I had seen a suggestion of making the title into a server control using syntax like:
<TITLE id="objTitle" runat="server" />

However, this works for a while, but VS.NET always eventually removes the runat attribute, and my code bombs. One reason might be that it isn't
included in the <form> tag?? Can the form tag be moved to begin above the header?? Any suggestions?

Thanks in advance.

Mark

Nov 18 '05 #3
The other technique is not to use runat=server but embed the title text as a
variable:

<TITLE><% =SomeVariable %></TITLE>

where you have

protected string SomeVariable in your codebehind class.
Ken
"Mark" wrote:
I am using Microsoft .NET Framework 1.1, Version 1.1.4322 SP1, with VS.NET
2003 Enterprise Architect. (Version 7.1.3088)

Any other ideas?

Thanks in advance.

Mark

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:3B**********************************@microsof t.com...
I thought that bug that removes runat="server" had been fixed. Are you

using
the latest service pack for VS.NET?

"Mark" wrote:
I'm interested in displaying a dynamic page title, rather than the static html <title>My Page</title>. In a previous posting, I had seen a suggestion of making the title into a server control using syntax like:
<TITLE id="objTitle" runat="server" />

However, this works for a while, but VS.NET always eventually removes the runat attribute, and my code bombs. One reason might be that it isn't
included in the <form> tag?? Can the form tag be moved to begin above the header?? Any suggestions?

Thanks in advance.

Mark


Nov 18 '05 #4
What I recommend, in a totally ASP.Net solution, is to put a literal inside
the TITLE tags....then, programmatically change the text property of the
literal
Check out:
http://aspnet101.com/titlechange.asp...tlechange.aspx

David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
http://aspexpress.com
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
I'm interested in displaying a dynamic page title, rather than the static
html <title>My Page</title>. In a previous posting, I had seen a suggestion of making the title into a server control using syntax like:
<TITLE id="objTitle" runat="server" />

However, this works for a while, but VS.NET always eventually removes the
runat attribute, and my code bombs. One reason might be that it isn't
included in the <form> tag?? Can the form tag be moved to begin above the
header?? Any suggestions?

Thanks in advance.

Mark

Nov 18 '05 #5
Mark, I've got the exact same problem with the runat disappearing from the
title tag. I'm at dev environment 7.1.3088--I'm going to check on Ken's
suggestion that there's a newer version with a fix. In the meantime, the
literal control works fine. Also, the disappearing runat= is very
predictable: the second you switch from code view to design view it goes away
in most cases, so I've just gotten in the habit of copying it back in there
after I've done design work.

Bill

"Mark" wrote:
I'm interested in displaying a dynamic page title, rather than the static
html <title>My Page</title>. In a previous posting, I had seen a suggestion
of making the title into a server control using syntax like:
<TITLE id="objTitle" runat="server" />

However, this works for a while, but VS.NET always eventually removes the
runat attribute, and my code bombs. One reason might be that it isn't
included in the <form> tag?? Can the form tag be moved to begin above the
header?? Any suggestions?

Thanks in advance.

Mark

Nov 18 '05 #6

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

Similar topics

6
by: Litron | last post by:
This question borders between HTML and JS. I would like to have one ALT tag for a Button (IMG src link) when the user creates an onMouseOver event and a second Alt tag displayed onMouseOver if...
6
by: 35th Ave Media | last post by:
Hello, I have about 60+ pages that I need to insert a MAILTO: tag so people can email the page using their email client. The body of the message is going to be the URL of that page. Using ASP,...
7
by: Abraham Luna | last post by:
how do i stop the dynamic validators from breaking explorer if i use a dynamic validator and move to a different control it breaks explorer and i can type in the page when i'm not supposed to....
2
by: WolfyUK | last post by:
Hello, I have a standard asp:DataGrid called CasesGrid that I wish to write my own paging controls for. The aim is to get something like the following rendered to screen: << First < Previous...
7
by: Bertman105 | last post by:
Hey all, Heres the situation: I have a form page that needs to have multiple drop down menus that is pulling their options from a database. Right now I have one working out of 3. So that is one...
2
by: thetechturf.com | last post by:
I have some simple dynamic content pages (included below). I need to know how to add specific meta tags (ie. description, keywords, ect.), as well as extra specific header coding to a page. I would...
6
by: Harshpandya | last post by:
HI all, I am working on the Ajax and PHP to make dynamic web page application I have HTML page - in which i am calling two different pages Google and NBC from Drop down menu. OUTPUT WANTED:...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.