I've just inhereted an asp site with the following sample directory structure:
Root(Folder)
MyProject(Folder)
MainPage.asp
BigProducts.asp
EmailLinks.asp
etc.
SmallProducts(Folder)
SmallProd1.asp
SmallProd2.asp
etc.
EvenSmallerProducts(Folder)
EvenSmaller1.asp
EvenSmaller2.asp
etc.
Each of the pages uses EmailLinks.asp which automatically dumps email address queried from an access database into a nice formatted box on the page through the following code:
Response.Write "<a href=EmailLinks.asp?emailid="
The problem is, all the files used to be organized under the MyProject(Folder). As the site grew, new smaller products were added under the MyProject(Folder) illustrated by SmallProducts(Folder).
The problem is now, the asp code:
Response.Write "<a href=EmailLinks.asp?emailid="
will not work when it is called from anything on the SmallProd(Folder) level or EvenSmaller(Folder) level because of the directory structure - the path is not right.
A workaround, I suppose, would be to put a copy of EmailLinks.asp into every subdirectory, but that seems inherently dumb. Another would be to put everything back at the MyProject(Folder) level, but I'd like to avoid that for the sake of clean organization.
These files have to be able to see EmailLinks.asp, even if their at different levels in the root directory. How do I get this to work? Possibly something with Server.mappath?
sc
How much water would there be in the ocean if it weren't for sponges?
Root(Folder)
MyProject(Folder)
MainPage.asp
BigProducts.asp
EmailLinks.asp
etc.
SmallProducts(Folder)
SmallProd1.asp
SmallProd2.asp
etc.
EvenSmallerProducts(Folder)
EvenSmaller1.asp
EvenSmaller2.asp
etc.
Each of the pages uses EmailLinks.asp which automatically dumps email address queried from an access database into a nice formatted box on the page through the following code:
Response.Write "<a href=EmailLinks.asp?emailid="
The problem is, all the files used to be organized under the MyProject(Folder). As the site grew, new smaller products were added under the MyProject(Folder) illustrated by SmallProducts(Folder).
The problem is now, the asp code:
Response.Write "<a href=EmailLinks.asp?emailid="
will not work when it is called from anything on the SmallProd(Folder) level or EvenSmaller(Folder) level because of the directory structure - the path is not right.
A workaround, I suppose, would be to put a copy of EmailLinks.asp into every subdirectory, but that seems inherently dumb. Another would be to put everything back at the MyProject(Folder) level, but I'd like to avoid that for the sake of clean organization.
These files have to be able to see EmailLinks.asp, even if their at different levels in the root directory. How do I get this to work? Possibly something with Server.mappath?
sc
How much water would there be in the ocean if it weren't for sponges?