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

detecting page name

Gav
Quick simple question...

how do u detect what the current pagename is (i.e. page.asp). also if the
command is stored in the include will it return the include file name or the
page that the command is included in name?

cheers
gavin
Jul 19 '05 #1
3 1514
Look up "request.servervariables()"

"Gav" <ga*****@ntlworld.com> wrote in message
news:CM****************@newsfep3-gui.server.ntli.net...
Quick simple question...

how do u detect what the current pagename is (i.e. page.asp). also if the
command is stored in the include will it return the include file name or the page that the command is included in name?

cheers
gavin

Jul 19 '05 #2
<%

page = Request.ServerVariables("Script_Name")

'// this will give you the path to the file you are on ... link
'// yourfolder/yourfile.asp

%>

And it will give you the page you are on, NOT the include file ... I
can't think of a way with ASP that will give you the include file ...
only way would be to have a variable on it that is read later

On Sat, 3 Jan 2004 13:50:17 -0000, "Gav" <ga*****@ntlworld.com> wrote:
Quick simple question...

how do u detect what the current pagename is (i.e. page.asp). also if the
command is stored in the include will it return the include file name or the
page that the command is included in name?

cheers
gavin


Jul 19 '05 #3
Gav
Hi,
Thats done the trick,
thanks mate

gav

"Brynn" <z@z.com> wrote in message
news:3f**************@news.comcast.giganews.com...
<%

page = Request.ServerVariables("Script_Name")

'// this will give you the path to the file you are on ... link
'// yourfolder/yourfile.asp

%>

And it will give you the page you are on, NOT the include file ... I
can't think of a way with ASP that will give you the include file ...
only way would be to have a variable on it that is read later

On Sat, 3 Jan 2004 13:50:17 -0000, "Gav" <ga*****@ntlworld.com> wrote:
Quick simple question...

how do u detect what the current pagename is (i.e. page.asp). also if the
command is stored in the include will it return the include file name or thepage that the command is included in name?

cheers
gavin

Jul 19 '05 #4

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

Similar topics

5
by: RootShell | last post by:
Hello I need to have a way to check if the user as refreshed the current page. Is there any way in PHP to do this? Here's the full facts, I have a JavaScript running that is merely a 30...
4
by: Michael Albanese | last post by:
I am trying to build a user control that will allow a user to select a date from a calendar. I have to code that will run on the calendar's SelectionChanged event, but i am at a loss to return the...
2
by: Halldór Ísak Gylfason | last post by:
In my application I have an iframe that is empty (and not visible) initially, however when a user presses a button a form is programmatically submitted and the target is set to the IFrame. I...
3
by: Csaba Gabor | last post by:
If I detect an empty textbox, I fill it with a value ('Dad'). If I do this twice, the second time around IE 6 fails to notice that I've cleared the textbox again, thus leaving the textbox cleared....
3
by: raptor | last post by:
hi, how to detect opera..it seems that even opera8 doesnt support xmlhttp fully (.i.e. sendRequestHeader). I ask this 'cause opera seems to mimic IE, at least in the preferences ?! I havent...
9
by: D. Shane Fowlkes | last post by:
I'm using SQL Server 2000 and on my page, I'm simply creating a SQLDataReader and filling in Labels with the retrieved (single) record. However, how can I prevent from getting errors when a field...
2
by: Sam-Kiwi | last post by:
I've spent the last 6 months developing a pay-per-download website using ASP.NET Users purchase documents and then download them. The intention is that users are only charged for documents...
79
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the...
1
by: rahul agarwal | last post by:
Hi i want to store windows login user name to database using asp & vbscript. For this i'm using Server Variables which will detect user name.But the problem i'm facing that it is not working on LAN...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.