detecting page name

G

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
 
B

Brynn

<%

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
 
G

Gav

Hi,
Thats done the trick,
thanks mate

gav

Brynn said:
<%

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top