1
Answer

Converting a relative link to an absolute link

Ian Journeaux

Ian Journeaux

11y
977
1
I am reading a web page with

HttpWebRequest
site = (HttpWebRequest)WebRequest.Create(link);               

HttpWebResponse response = (HttpWebResponse)site.GetResponse();

Stream dataStream = response.GetResponseStream();

StreamReader read = new StreamReader(dataStream);

String data = read.ReadToEnd();


I am parsing the page out to locate some download links but the download links are relative links. I was wondering what the correct method would be to convert it to an absolute link?

Thanks


Answers (1)