Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual path

Status
Not open for further replies.

croydon

Programmer
Joined
Apr 30, 2002
Messages
253
Location
EU
Is there a function I can include in my code that will return the virtual path of my project?

Thanks.
 
Request.ServerVariables("PATH_INFO")

------------------------------------------------------------------------------------------------------------------------
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair."
--Dou
 
Chopstik, unfortunately PATH_INFO tells me the virtual path of the form that is displayed, but I am looking for the virtual path of the project (i.e. "/webapplication1" not "/webapplication1/menu.aspx)
 
In which case you could simply parse through the path of the file to just obtain the path of the entire project, yes? If all you need is the path of the project, just strip out the last part which would presumably be the file itself and you would be left with what you need.

------------------------------------------------------------------------------------------------------------------------
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair."
--Dou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top