0
kicks
How to resolve URL to absolute path when you don’t have access to page
Sometimes you need to resolve URL, but you don’t have the Page.ResolveUrl() function in your context. One example is in the Web Service or Handlers. A real world example could be you have a web service that will do data binding for a grid, and you need to generate edit/preview links for grid items, so you need to convert “~/path-to-data.aspx” to something such as “/Website/path-to-data.aspx”, so you need to know what the virtual path of the current application is.