How do I get the name of an ASP Classic file, including its extension, to see which page I am editing?
Using this simple script, you can find out what page.asp you are working on.
This is handy when testing pages before adding code to a live site.
[ASP Classic - See what page I am on]
CFFCS | CarrzSynEdit: | ASP/VBScript

     arrPath = Split(Request.ServerVariables("SCRIPT_NAME"), "/")
     strfileName = arrPath(UBound(arrPath))

     if strfileName = "test.asp" then
          response.write "You are editing the test page."
     elseif strfileName = "default.asp" then
          response.write "You are loading the live page."
     end if

The above is just an example. To use this in a real-world scenario, we will do something like this. Here, we are changing the file name in our live code from test.asp page to the default.asp page.
This way, we can run our test on the test page, then move our code to the live page and test it there.
[ASP Classic - Change Page Name]
CFFCS | CarrzSynEdit: | ASP/VBScript

     if strfileName = "test.asp" then
          theFile = "test.asp"
     elseif strfileName = "default.asp" then
          theFile = "default.asp"
     end if

 	  Siteurl = "192.168.2.1/MySite"
          theSiteID = "//"&Siteurl&"/"&theFile&"?Type=Site&ID=1

When you load the test.asp page. This will trigger the code to load the appropriate file name in the page links. This will enable you to click links throughout the site without worrying about the page loading the default.asp page.
Scenarios like this are what we use in our development. Though we have not used this method before, we have started doing it to make it easier to develop our site when working with the rewrite rules.