Connecting Tech Pros Worldwide Forums | Help | Site Map

ASP file names

Newbie
 
Join Date: Aug 2008
Posts: 2
#1: Aug 21 '08
Hello

I am making a website and I want to use ASP file names instead of HTML file names because I think it will block subpages from opening individually without their parent pages. I have IIS installed and I can rename my HTML pages to ASP and view them and everything works fine.
The only problem is that I can see people calling up subpages (inside web pages) with names like info.asp?ID=23 but I cannot see what the real name of the file being called is. I have tried names like info.asp23 and info.asp#23 but nothing works. I have searched in Google a thousand times but I cannot find an answer to this problem.
Perhaps I misunderstand the whole thing and info.asp?ID=23 is not an inividual file but one part of a larger file.
Is there any way you could explain this mystery in a few words or show me a directory listing of just such files?

Newbie
 
Join Date: Aug 2008
Posts: 2
#2: Aug 21 '08

re: ASP file names


I found a zipped website with ASP files. The files had names like
info.asp?id=23 but when I unzipped it all the ? were changed to _ presumably because Windows does not allow ? in file names. However this seemed to answer my question about the file names. I moved the files to the internet and there I changed the _ back to ? in my ftp program - i.e. I renamed the files.
But to my surprise the files with ? in the name would not load in my browser - the browser could not find them. So I am still mystified.
Newbie
 
Join Date: Jun 2008
Posts: 25
#3: Aug 21 '08

re: ASP file names


ok. here's the answer. please keep an open mind when i tell you this:
the real asp file behind a url like this:
Expand|Select|Wrap|Line Numbers
  1. http:\\www.mysite.com\info.asp?id=23
in your browser is really coming from a file named info.asp and the ?id=23 part is an argument being passed to the asp page just like a function is passed arguments on the command line in compiled or standalone executables its read like this:
Expand|Select|Wrap|Line Numbers
  1. variable id is assigned the value of 23
so when the info.asp file requests a the value of 'id' it gets 23.
Expand|Select|Wrap|Line Numbers
  1. <%
  2.     Dim x
  3.     x = request("id")
  4.     response.write(x)
  5. %>
if info.asp contained this code it would print 23 or the value of 'id'.
Reply