skip to main | skip to sidebar

Techie...

Tuesday, December 2, 2008

How to Read the HTML of a Web Page Programmatically

Reading the contents of a web page is so easy in .net Try the below code and see the O/P.

WebRequest req = WebRequest.Create("http://www.hcl.in");
WebResponse res = req.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream());
string html = sr.ReadToEnd();
Posted by Chandrasekar at 11:21 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blogs I read

Harish Renganathan
Lakshmi
Scottgu
Pandurang Nayak
Somasegar

Blog Archive

  • ►  2009 (3)
    • ►  August (2)
    • ►  July (1)
  • ▼  2008 (23)
    • ▼  December (23)
      • Very useful link for Sql Server - Everyone has to see
      • Important Free tools
      • Create an XSD Schema….without knowing a darn thing...
      • Setting homepage dynamically
      • Microsoft .NET Framework Tools
      • Chart Controls in .net
      • Text To Image Convertor
      • you Shape IT
      • MSDN Architecture Center
      • SharePoint Guidance
      • Quick ADO.net Tip
      • Very Important Link About Memory Leak - Must Read
      • Cool link
      • Copying a website
      • How to Read the HTML of a Web Page Programmatically
      • Patterns & Practices
      • Useful links
      • Free WCF Training
      • Versioning ASP.NET 2.0 WebSite Assembly / Web Depl...
      • Cool links
      • Online GUID Generator
      • RGB in Hex format
      • Download ASP.NET MVC Preview 3
  • ►  2006 (1)
    • ►  November (1)

About Me

Chandrasekar
View my complete profile