How to extract HTML code From any webpage using C#.Net
-
How to extract html code any web site using C#.Net I mean : http://www.yahoo.com----in that site find the Urls,Emailid,phone Pls give code Reddy
-
How to extract html code any web site using C#.Net I mean : http://www.yahoo.com----in that site find the Urls,Emailid,phone Pls give code Reddy
Grabbing the HTML is easy, the rest probably involves regular expressions to parse the string that contains the page.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
How to extract html code any web site using C#.Net I mean : http://www.yahoo.com----in that site find the Urls,Emailid,phone Pls give code Reddy
allivelu wrote:
How to extract html code any web site using C#.Net I mean : http://www.yahoo.com----in that site find the Urls,Emailid,phone
I'm not sure exactly what you want. If you are looking to get the HTML for a webpage, load it in a WebBrowser object and use the DocumentText property to retrieve the HTML as a string. If you are looking for the URLs, email, and phone numbers, you'll need to look at the string you got from calling browser.DocumentText for substrings that match the pattern of a URL, email address or phone number. The Regex class is what you might want to look at, since that is *really* helpful at doing pattern matching. Good Luck!
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?