Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > detecting page name

Reply
Thread Tools

detecting page name

 
 
Gav
Guest
Posts: n/a
 
      01-03-2004
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


 
Reply With Quote
 
 
 
 
only_me
Guest
Posts: n/a
 
      01-03-2004
Look up "request.servervariables()"

"Gav" <(E-Mail Removed)> wrote in message
news:CMzJb.1272$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Brynn
Guest
Posts: n/a
 
      01-03-2004
<%

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" <(E-Mail Removed)> 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
>
>


 
Reply With Quote
 
Gav
Guest
Posts: n/a
 
      01-04-2004
Hi,
Thats done the trick,
thanks mate

gav

"Brynn" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> <%
>
> 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" <(E-Mail Removed)> 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
> >
> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detecting which page opened current page, how? Jeff ASP .Net 2 05-28-2007 07:30 AM
adding a variable name to a hash to name is part of the variable name Bobby Chamness Perl 2 04-22-2007 09:54 PM
print("my name is {name}, and {age}-year old {gender}", name, age, gender); =?iso-8859-1?B?bW9vcJk=?= Java 7 01-02-2006 04:39 PM
Detecting Page Refresh from a child page ratnakarp@gmail.com ASP .Net 0 09-07-2005 04:44 AM
Re: Urgent! how to get object name, method name and attribute name based on the strings? ding feng C++ 2 06-25-2003 01:18 PM



Advertisments