Blog Stats
  • Posts - 5
  • Articles - 0
  • Comments - 21
  • Trackbacks - 5

 

August 2006 Entries

Reverse Server.MapPath()

Here's a simple ASP.NET function that will get the opposite result of the Server.MapPath() function. This comes in handy when you're retrieving files recently saved by your web application. Pass it a fully qualified path and it returns a URL Public Function MapURL(ByVal Path As String) As String Dim AppPath As String = _ HttpContext.Current.Server.... Dim url As String = String.Format("~{0}" _ , Path.Replace(AppPath, "").Replace("\", "/")) Return urlEnd Function Of course, you will have...

 

 

Copyright © Albert Raiani