1

I am trying to fetch pages using "httpwebrequest", but the links also have relative path in them like (.../something/, ../.../something/) , i am trying to map them to absolute path, i am not too good at programming, do we have any utility helpers to do the job, any links, articles, tutorials appreciated.

Thank you in advance.

Milan Solanki
  • 1,207
  • 4
  • 25
  • 48

1 Answers1

2
var base = new Uri("http://stackoverflow.com/a/b/c/d.html");
var relative = new Uri(base, "../e.html"); // http://stackoverflow.com/a/b/e.html

Uri(Uri, String)
Uri.AbsolutePath

zerkms
  • 249,484
  • 69
  • 436
  • 539