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

Can I request the filename that was loaded?

Greetings again,

Thanks for all the great help so far.

One of the things I do is do my testing on an alternate address, then
store the file as the regular address after it tests correctly, but
since I might mention the test page in various forums when I ask
questions, I leave it uploaded just in case someone later sees the link
and clicks it.

So far, my kludgy way of handling it is to have a variable called
"thispage" and set it equal to the page I'm working on, so when it
links to itself, it links back to the page in question.

Is there a way of automatically testing for this value instead of
manually defining it? I tried a quick Google search, but I didn't know
what to call it. I assume it might be in the same general collection as
the HTTP_REFERER item.

Thanks.

John

Jan 16 '06 #1
2 1207

<Go******************@gmail.com> wrote (not sure you are right there)
Greetings again, ..> ...Is there a way of automatically testing for this value instead of manually defining it? ...


Are these any use?

'BaseURL - http:/www.mysite.com
BaseURL="http://" & Request.ServerVariables("HTTP_HOST")

'TopURL - /subdir1/subdir2/default.asp
TopURL = Request.ServerVariables("URL")

tmp1=split(TopURL,"/")
tmp2=len(tmp1(ubound(tmp1,1)))

'PageFileName - default.asp
PageFileName=right(TopURL,tmp2)

'ShortPath - /subdir1/subdir2/
ShortPath=left(TopURL,len(TopURL)-tmp2)

HTH, Giles
Jan 16 '06 #2
Thanks, Giles,

PageFileName was EXACTLY what I wanted.

If you enjoy mazes, be sure to download the maze you find here:

http://mazes.com/asp-maze/amazingtes...at=merit&first
name=Giles

That's the page that your code will save me a few minutes of future
editing.

John
www.MAZES.com
www.MessageMazes.com
www.GodLovesEveryone.org
etcetera

*** Sent via Developersdex http://www.developersdex.com ***
Jan 16 '06 #3

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

Similar topics

21
by: Michele Simionato | last post by:
I often feel the need to extend the string method ".endswith" to tuple arguments, in such a way to automatically check for multiple endings. For instance, here is a typical use case: if...
6
by: Christopher Brandsdal | last post by:
Hi! I get an error when I run my code Is there any other way to get te information from my form? Heres the error I get and the code beneath. Line 120 is market with ''''''''''''Line...
1
by: SW | last post by:
I have an ASP page that causes Excel to be loaded on the client PC with the text sent from within the page. An excerpt of it is shown below: With Response .ContentType =...
9
by: Adam Monsen | last post by:
I kindly request a code review. If this is not an appropriate place for my request, where might be? Specific questions are in the QUESTIONS section of the code. ...
2
by: kinghuangz | last post by:
Everyone: I want to use a DLL(FileName:PubFunction.Dll) built with VS.Net(C#) in a unmanaged Program .But there was a Dll just has the same filename,it was built with VC++(6.0).The unmanaged was...
4
by: Jit Prasad | last post by:
I have a working client-side Vb.Net (.net v1.0) app that talks to a Webspere webservice on a windows 2000 server. The client side app runs on a citrix server, also a Windows 2000 server. The app...
0
by: Brad Wood | last post by:
<environment> Consuming a web service from a VS2005 beta 2 test harness on WinXP. Web service built with VS2003 running on my machine with IIS 5X set to use ASP.NET 1.1 </environment> I have...
9
by: pob | last post by:
I currently have a procedure that loops thru a recordset to determine what files need to be loaded to my database. The naming convention of the files has always been accounts.txt, namelist.txt,...
5
by: dabei | last post by:
Hi, I am trying to use AS3 to make a URL request with authorization header. Using the code below: var request:URLRequest = new URLRequest ( 'http://myserviceURL' ); var...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.