ASP file names

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gunna
    New Member
    • Aug 2008
    • 2

    ASP file names

    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?
  • gunna
    New Member
    • Aug 2008
    • 2

    #2
    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.

    Comment

    • Jerry Winston
      Recognized Expert New Member
      • Jun 2008
      • 145

      #3
      ok. here's the answer. please keep an open mind when i tell you this:
      the real asp file behind a url like this:
      Code:
      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:
      Code:
      variable id is assigned the value of 23
      so when the info.asp file requests a the value of 'id' it gets 23.
      Code:
      <%
          Dim x
          x = request("id")
          response.write(x)
      %>
      if info.asp contained this code it would print 23 or the value of 'id'.

      Comment

      Working...