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

Getting a ASP file name via VBScript

Is there a function in VBScript that will return the name of the file
that is currently being executed? Basically, I'm looking for a function
that I can use in code similar to this...
<% response.write "The name of this file is - " thisFile.fileName %>

which will result in

The name of this file is - home.asp

being displayed on the page with home.asp executes.

Jul 19 '05 #1
2 1539
"David C. Holley" <Da**********@netscape.net> wrote in message
news:uy*************@TK2MSFTNGP11.phx.gbl...
Is there a function in VBScript that will return the name of the file
that is currently being executed? Basically, I'm looking for a function
that I can use in code similar to this...
<% response.write "The name of this file is - " thisFile.fileName %>

which will result in

The name of this file is - home.asp

being displayed on the page with home.asp executes.


Request.ServerVariables("SCRIPT_NAME")
http://msdn.microsoft.com/library/en...rvariables.asp
Jul 19 '05 #2
Thank you and know for the code that I was thinking of...

session("go_pageRequested") =
Request.ServerVariables("SCRIPT_NAME")

session("go_pageAlternate") = "reservationRequest_Error.asp"

My soon-to-be custom error page will automatically log the page the
encountered the error and then attempt to redirect to the indicated
page.

David H

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

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

Similar topics

5
by: Mats | last post by:
As there is no change filename command in vbscript you have to take a diversion. According to aspfaq http://www.aspfaq.com/show.asp?id=2074 the following should work: <% set fso =...
2
by: Ruskin | last post by:
I have developed an upload tool, that allows users to upload files (funny that). The asp form object has a 'SizeLimit' property that can be set, to prevent files being uploaded, that are too large....
1
by: Lyle Fairfield | last post by:
Option Explicit ' requires VBScript to be installed ' (maybe don't give this to your sugnificant other as ' it gets deleted addresses as well as current) ' obvious fixups needed '1. how get...
9
by: Morris Neuman | last post by:
Im working with VS 2005 and trying to use a Hyperlink field in a datagrid to play a wave file that is not located in the website folders but is in a plain folder on the same machine, windows 2003...
1
by: hardik | last post by:
can anyone tell me how i can change the filename which is going to uploaded here is a code for uploading a file <!-- #include file="clsUpload.asp" --> Set objUpload = New clsUpload If...
0
by: =?Utf-8?B?TWFyY2VlcG9v?= | last post by:
I'm a newbie using Visual Studio and Vb.Net. The vbscript below opens a Windows Explorer Search Window. The Windows Explorer Search Window has fields in which the user can insert: (i) a search...
9
vikas251074
by: vikas251074 | last post by:
I am not getting date value in spite of my good effort. This code was working in my last office where I work. Now I am trying to work at my home pc. but not getting date value. Any can help me why...
7
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am...
0
by: ismailc | last post by:
Good day, I need help. I have an application that uses aspx pages together with vbscript window for developer coding. Now the page has an <input type='file'> upload object. The problem is...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
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...

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.