Suppose I have a resource located in ~/Resources/R1.png
This relative resource URL will depend on the current address.
For example:
If I am in www.foo.com/A/B/C/D.aspx, and www.foo.com/Ais the root path, including Virtual Directory, then the path to the current address ~/Resources/R1.pngis../../../Resources/R1.png
How can I get this relative path?
EDIT:
I want a web path that I can use on a web page, not a server path.
source
share