is there an opposite of server.mappath?

D

darrel

Given a URL to a file, you can user server.mappath to get the actual system
file path.

Is there a function that does the opposite?

Ie, if I have this:

c:\inetpub\wwwroot\documents\myfile.txt

is there a function that will return:

/documents/myfile.txt?

I could parse the above do that myself, but was wondering if there is
already a built in function for that.

-Darrel
 
B

Brock Allen

No there's not, because you could have any number of applications that map
onto that physical path.

You probabaly should always build a relative path from Request.ApplicationPath.
 
K

Kevin Spencer

(lru)htappam.reves

--
Good Monday Morning,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
K

Kevin Spencer

YOU try typing "reverse" in reverse in a Monday morning! ;-)

--

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top