Get Content of another website
-
Hi all, how can i get the HTML content of another website [as a string or something like that ]. Any help would be appreciated. Thanks in advance. Ali
-
Hi all, how can i get the HTML content of another website [as a string or something like that ]. Any help would be appreciated. Thanks in advance. Ali
Yes you can do that using HttpWebRequesr and response.GetResponseStream(); method that return html in stream .Play around it you will definatly get solution
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(URL); HttpWebResponse response = (HttpWebResponse)myHttpWebRequest.GetResponse(); resStream = response.GetResponseStream();
Thanks and Regards Sandeep If you want something you never had, do something you have never done!
-
Yes you can do that using HttpWebRequesr and response.GetResponseStream(); method that return html in stream .Play around it you will definatly get solution
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(URL); HttpWebResponse response = (HttpWebResponse)myHttpWebRequest.GetResponse(); resStream = response.GetResponseStream();
Thanks and Regards Sandeep If you want something you never had, do something you have never done!
hi sandeep thanks for the help, but i had already tried this but i get the html upto the starting of tag... thanks, Ali