How get the virtual path based on the physical path?
- From: marss <marss.ua@xxxxxxxxx>
- Date: Thu, 13 Sep 2007 04:59:53 -0700
Server.MapPath("~/page.aspx") returns the physical file path based on
the specified virtual path. Is there any reverse method to get the
virtual path based on the physical path (both pathes belong to the
same web application)?
Usually I do in this way:
virtualFilePath =
physicalFilePath.Replace(physicalRootDirectoryPath,"~/")
Perhaps, is there standard inbuilt method?
Mykola
http://marss.co.ua
.
- Follow-Ups:
- Prev by Date: RE: httpModules in IIS 6?
- Next by Date: Re: webservice without objectmodel possible?
- Previous by thread: Errors - two more
- Next by thread: Re: How get the virtual path based on the physical path?
- Index(es):
Relevant Pages
|