transform relative address to absolute address

  • Thread starter Thread starter Franz
  • Start date Start date
System.Uri can do this for you;

Uri basePath = new Uri(@http://www.foo.com/bar/foo1.htm);
Uri fullPath = new Uri(basePath, @"../bar2/foo1.htm");

System.Diagnostics.Debug.WriteLine(fullPath.AbsoluteUri);

Other related items are UriBuilder, and System.Xml.XmlUrlResolver

Nick Holmes.
 
Back
Top