GetHtmlPage - Returnerer HTML'en fra en url i en string.
Kræver namespaces :
System.Net
System.IO
public string GetHtmlPage(string strURL)
{
string strResult;
WebRequest objRequest = System.Net.HttpWebRequest.Create(strURL);
WebResponse objResponse = objRequest.GetResponse();
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
strResult = sr.ReadToEnd();
}
return strResult;
}