How can I get the page title into an variable to handle in my asp.
Don 6 2474
Don Grover wrote on 31 jan 2004 in microsoft.publi c.inetserver.as p.general: How can I get the page title into an variable to handle in my asp.
The question is not very clear,
as we do not know what you mean with "my ASP",
but let's assume you mean a serverside variable:
<% pageTitle = "This is page One" %>
<title><%=pageT itle%></title>
If, however, you mean a clientside variable,
please ask in a clientside NG.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Thanks for answering Evertjan
I did not want to rabbit on about it But !,.
I am using a whoson.asp page that at the moment displays the script name ie
mypag.asp in the display.
Instead of this I want to use the page title their on.
This is coming from an include file tagged onto every asp page on my site.
What I want to do on server side is grab the page title and stick it in a
vbscript variable to I can pick it up in the include and replace the page
name with the page title.
I dont want to have to do this on 250 pages & development site pages
<% pageTitle = "This is page One" %>
<title><%=pageT itle%></title>
There must be a way to grab the page title server side. ?
Don
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29... Don Grover wrote on 31 jan 2004 in
microsoft.publi c.inetserver.as p.general: How can I get the page title into an variable to handle in my asp.
The question is not very clear, as we do not know what you mean with "my ASP", but let's assume you mean a serverside variable:
<% pageTitle = "This is page One" %> <title><%=pageT itle%></title>
If, however, you mean a clientside variable, please ask in a clientside NG.
-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Don Grover wrote on 31 jan 2004 in
microsoft.publi c.inetserver.as p.general: What I want to do on server side is grab the page title and stick it in a vbscript variable to I can pick it up in the include and replace the page name with the page title. I dont want to have to do this on 250 pages & development site pages <% pageTitle = "This is page One" %> <title><%=pageT itle%></title>
There must be a way to grab the page title server side. ?
[please do not toppost on usenet]
Sure there is, but setting an include on all your 250 pages can easily
be done with an advanced editor like Editpad in one go.
Otherwise, do you want to insert the title serverside every time a page
is called?
==============
So you want to grab the page title and insert it into the page name?
In my book the page name is the same as the page title. ;-)
Please define.
===============
Changing the page name/title can be done with serverside Regex:
Jscriptlike serverside Pseudocode:
<%
t = getPageAsString ("mypage.asp ")
t = t.replace(/<title>(.*)?< \/title>/im,"my new title")
ReplacePageWith String("mypage. asp",t)
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29... Don Grover wrote on 31 jan 2004 in microsoft.publi c.inetserver.as p.general:
What I want to do on server side is grab the page title and stick it in a vbscript variable to I can pick it up in the include and replace the page name with the page title. I dont want to have to do this on 250 pages & development site pages <% pageTitle = "This is page One" %> <title><%=pageT itle%></title>
There must be a way to grab the page title server side. ?
[please do not toppost on usenet]
Sure there is, but setting an include on all your 250 pages can easily be done with an advanced editor like Editpad in one go.
Otherwise, do you want to insert the title serverside every time a page is called?
==============
So you want to grab the page title and insert it into the page name? In my book the page name is the same as the page title. ;-)
Please define.
===============
Changing the page name/title can be done with serverside Regex:
Jscriptlike serverside Pseudocode:
<% t = getPageAsString ("mypage.asp ") t = t.replace(/<title>(.*)?< \/title>/im,"my new title") ReplacePageWith String("mypage. asp",t) %>
I have editpad, but the Title is hard coded ie. like <title>PURCHASI NG :
ADD</title>
using editpad i know i can fly through all pages and add a line feed and
new line containing <% myVar = something.title %> after the </title>
but what code can i add to the page to put the title in a vbscript variable
'myVar'
it will then renew it every time page loads, and I can pick up var in
existing footer code.
Thats as clear as Ican make it ?.
Don
Don Grover wrote on 31 jan 2004 in
microsoft.publi c.inetserver.as p.general: I have editpad, but the Title is hard coded ie. like <title>PURCHASI NG : ADD</title>
Editpad can replace across multiple files with Regex,
so I think you can replace the regex string:
<title>.*?<\/title>
with
<% response.write "<title>" & myTitle & "</title>" %>
or even better with
<!--#include virtual ="/myTitleInserter .inc.asp"-->
in this latest case you can later change the whole title setup
by filling the file "/myTitleInserter .inc.asp" with:
<%
rsv = request.serverv ariable("SCRIPT _NAME")
if rsv = "/q/bonny.asp" then
myTitle = "Marvellous Title"
else
myTitle = "Normal Title"
end if
response.write "<title>" & myTitle & "</title>"
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
You could always use client-side javascript to write out the parts of
the page which contain the title (failing gracefully on non js-enabled
browsers of course...)
Tim
"Don Grover" <sp******@assof t.com.au> wrote in message
news:O0******** ******@TK2MSFTN GP12.phx.gbl... "Evertjan." <ex************ **@interxnl.net > wrote in message news:Xn******** ************@19 4.109.133.29... Don Grover wrote on 31 jan 2004 in microsoft.publi c.inetserver.as p.general:
What I want to do on server side is grab the page title and
stick it in a vbscript variable to I can pick it up in the include and
replace the page name with the page title. I dont want to have to do this on 250 pages & development site
pages <% pageTitle = "This is page One" %> <title><%=pageT itle%></title>
There must be a way to grab the page title server side. ?
[please do not toppost on usenet]
Sure there is, but setting an include on all your 250 pages can
easily be done with an advanced editor like Editpad in one go.
Otherwise, do you want to insert the title serverside every time a
page is called?
==============
So you want to grab the page title and insert it into the page
name? In my book the page name is the same as the page title. ;-)
Please define.
===============
Changing the page name/title can be done with serverside Regex:
Jscriptlike serverside Pseudocode:
<% t = getPageAsString ("mypage.asp ") t = t.replace(/<title>(.*)?< \/title>/im,"my new title") ReplacePageWith String("mypage. asp",t) %>
I have editpad, but the Title is hard coded ie. like
<title>PURCHASI NG : ADD</title> using editpad i know i can fly through all pages and add a line
feed and new line containing <% myVar = something.title %> after the </title> but what code can i add to the page to put the title in a vbscript
variable 'myVar' it will then renew it every time page loads, and I can pick up var
in existing footer code. Thats as clear as Ican make it ?. Don This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 pages using the require_once
function.
That is, each page includes the line
<?require_once('PageStart.php')?>
|
by: alex |
last post by:
Hi !
I couldn't make backups with our new system using db2 8.2.
Every time I trigger a backup I get this error message:
BACKUP DATABASE EBUERO2 ONLINE TO "/raid/backup/ebuero2/part1",
"/raid/backup/ebuero2/part10", "/raid/backup/ebuero2/part11",
"/raid/backup/ebuero2/part12", "/raid/backup/ebuero2/part13",
"/raid/backup/ebuero2/part14", "/raid/backup/ebuero2/part15",
"/raid/backup/ebuero2/part16", "/raid/backup/ebuero2/part17",
|
by: Maxim Izbrodin |
last post by:
Hello
For displaying page titles for my ASP.NET applications I use the following technique
<title><%=BannerModule.PageTitle%></title
where BannerModule.PageTitle is a public field of my user control. This field is initialized in Page_Load of every my page. This technique works with the exception that the title disappears every time a page is posted back. Could somebody explain me the reason, or suggest a better technique for setting page...
|
by: Glenn M |
last post by:
I have a shared XML file on a server .
i also have one xslt file that performs a simple transform on in to
view the data.
now i want to have another page that lets users modify the shared xml
file via some editable controls such as text boxes , option boxes etc.
how can i implment this , should i use another xslt file with <INPUT>
controls . if so how can i save the result back using the asp.net
|
by: Paul |
last post by:
I want to set the page title and/or a form hidden field programatically
through ASP.Net.
I do not want to use something like...
<% sTitle ="My Title" %>
<html><title><%=sTitle%></title>.....
I want to completely seperate the code from presentation.
I would like to do the same thing for a value of a hidden form field but
| |
by: scottyman |
last post by:
I can't make this script work properly. I've gone as far as I can with
it and the rest is out of my ability. I can do some html editing but
I'm lost in the Java world. The script at the bottom of the html page
controls the form fields that are required. It doesn't function like
it's supposed to and I can leave all the fields blank and it still
submits the form. Also I can't get it to transfer the file in the
upload section. The file name...
|
by: vj |
last post by:
How i can populate all fileds dynamically in jsp page based on contents
found in xml file?
I have written jsp servlets and java class file.
i transferred automatic data from jsp to servlet then to java class
which creates a xml file based on values entered in dynamic jsp page.
Now i want to read all those values entered to xml in my other jsp
page.
I am able to call values from file in my jsp page.
But as dynamic values can be any in no...
|
by: Spondishy |
last post by:
Hi,
I have a fairly simple httpmodule tied in to the endrequest event of
the pipeline that writes the page title to the iis log. The problem is,
I have a page where the title is changed in the page_load. The page
title is changed in the page load depending on a query string id on the
url.
For example an ID of 1 might be a page title of "Page Title 1"
An ID of 2 might be a page title of "Page Title 2"
|
by: osward |
last post by:
I had made a table colum sortable and paging the table, following are the code
// Display Event List
echo "<center>"._EVENTLIST."</center><br>";
$now = Date(Y-m-d);
// sort table colum
if(!isset($_GET)){
$page = 1;
} else {
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |