You can try this
private string GetHtmlFromUrl(string url)
{
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
using (Stream stream = request.GetResponse().GetResponseStream())
{
using (StreamReader reader = new StreamReader(stream))
{
string response = reader.ReadToEnd();
return response;
}
}
}
Please vote and Accept Answer if it Helped.