Absolute path back to web-relative path

Perhaps this might work:

String RelativePath = AbsolutePath.Replace(Request.ServerVariables["APPL_PHYSICAL_PATH"], String.Empty);

I’m using c# but could be adapted to vb.

Leave a Comment