The UrlFormatter type exposes the following members.

Methods

  Name Description
Public method Static member GetHostNameFromURL(String)
Retrieve Host name from full URL e.g. http://www.host.com?someparam=value
Public method Static member GetHostNameFromURL(String, Boolean)
Retrieve Host name from full URL e.g. http://www.host.com?someparam=value and strip prefix
Public method Static member ResolveServerUrl(String)
This method returns a fully qualified absolute server Url which includes the protocol, server, port in addition to the server relative Url. It work like Page.ResolveUrl, but adds these to the beginning. This method is useful for generating Urls for AJAX methods
Public method Static member ResolveServerUrl(String, Boolean)
This method returns a fully qualified absolute server Url which includes the protocol, server, port in addition to the server relative Url. Works like Control.ResolveUrl including support for ~ syntax but returns an absolute URL.
Public method Static member ResolveUrl
Returns a site relative HTTP path from a partial path starting out with a ~. Same syntax that ASP.Net internally supports but this method can be used outside of the Page framework. Works like Control.ResolveUrl including support for ~ syntax but returns an absolute URL.
Public method Static member ToRelativePath
Converts Physical Path To Relative Path. Note: Physical Path needs to be under the current Web application's root.
Public method Static member ToRelativeUrl
Converts the absolute path to the relative path.

See Also