How can I get the relative virtual path from the physical path in asp.net? The reverse method is like below:
Server.MapPath("Virtual Path Here");
But what is the reverse of the upper method?
See Question&Answers more detail:osHow can I get the relative virtual path from the physical path in asp.net? The reverse method is like below:
Server.MapPath("Virtual Path Here");
But what is the reverse of the upper method?
See Question&Answers more detail:osMaybe this question is what you're looking for. There they suggest:
String RelativePath = AbsolutePath.Replace(Request.ServerVariables["APPL_PHYSICAL_PATH"], String.Empty);