Saturday, 3 March 2012

Web Page Requesting and getting Response ASP.NET C#




add namespace

using System.Net;
using System.IO;


code:



HttpWebRequest req = (HttpWebRequest) WebRequest. Create("http://www.rsmmukesh.blogspot.in/"); 

HttpWebResponse response = (HttpWebResponse)req.GetResponse();

StreamReader reader = new StreamReader(response.GetResponseStream());

string strSite = reader.ReadToEnd();

No comments:

Post a Comment

IE7 Issues Text Indent

                 Unfortunately IE 7 is still widespread among the users hence while theming we have to give special importance to the grea...