Maybe this question is what you’re looking for.
There they suggest:
String RelativePath = AbsolutePath.Replace(Request.ServerVariables["APPL_PHYSICAL_PATH"], String.Empty);
More Related Contents:
- Path.Combine for URLs?
- Absolute path back to web-relative path
- @(at) sign in file path/string [duplicate]
- How to Format a date pass as a parameter to a function and return data is a string with “yyyy/mm/dd” format?
- Memory leak in Data Access layer using enterprise library
- Can I specify a custom location to “search for views” in ASP.NET MVC?
- How can I get a list of users from active directory?
- Has an event handler already been added?
- MVC Razor view nested foreach’s model
- GridView Hide Column by code
- DataView.Sort – more than just asc/desc (need custom sort)
- Get error message if ModelState.IsValid fails?
- How to return JSON with ASP.NET & jQuery
- How to access page controls inside a static web method? [duplicate]
- How to restrict file type in FileUpload control
- Can’t get sql server compact 3.5 / 4 to work with ASP .NET MVC 2
- The data source does not support server-side data paging
- Prevent textbox autofill with previously entered values
- How can I secure passwords stored inside web.config?
- IIS Express Immediately shutting-down running site after stopping web application
- How to change CurrentCulture at runtime?
- How to return a PDF from a Web API application
- Fancybox – ASP.NET button not working
- UTF-8 or UTF-16 or UTF-32 or UCS-2
- How to send a Status Code 500 in ASP.Net and still write to the response?
- How to convert DataTable to class Object?
- call async method without await #2
- How to set the value of a textbox textmode=date ASP.NET C#
- Find a control in a webform
- How to get the first five character of a String