Get the name of the file

Results 1 to 3 of 3

Thread: Get the name of the file

  1. #1
    Join Date
    Dec 1969

    Default Get the name of the file

    Is there anyway I can have a page get it&#039;s current file name (the one that appears in the address bar) and then make it into a variable?<BR><BR>I have independent listboxes that submit to themselves so that I can pull a category out of a database and then based on that category, pull a list of subcategorys. For my Form action I have it doing: ?action=display . Works fine and dandy except for Netscape, which requires the actual file name: default.asp?action=display. That woudl also be fine and dandy except I want to reduce my work enormusly by have the list boxes in an include fiel that I can just add the include. This list box area is going to be replicated over ALOT of pages, which is why I apted to go for an include. But, maybe I am SOL and will have to do it the hard way unless someone has a cure...<BR><BR>WhatI was thinking is if I can get the cutrrent file name, I could just set it to filenamevar and then have filenamevar?action=display<BR><BR>Help?<BR><BR>Tha nsk in advance

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default R&D Request.ServerVariables <eop>


  3. #3
    Join Date
    Dec 1969

    Default RE: Get the name of the file

    This gives you the URL:<BR><BR> Request.ServerVariables("URL")<BR><BR>Some string manipulation on that could extract the page, if required.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts