Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: stack overflow in loadhtml

$
0
0

i never get any error with this, maybe its will help to you.

Goodluck

 

 public static string GetURLData(string URL)
        {
            try
            {
                HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(URL);
                request.UserAgent = "Omurcek";
                request.Timeout = 4000;
                WebResponse response = request.GetResponse();
                Stream stream = response.GetResponseStream();
                StreamReader reader = new StreamReader(stream);
                return reader.ReadToEnd();
            }
            catch (Exception ex )
            {
                LogYaz("Receive DATA Error : " + URL   + ex.ToString());
                return "";
            }

        }

 string Data = GetDataURL("www.abc.com")
 HtmlAgilityPack.HtmlDocument doc
 doc.LoadHtml(Data);


Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>