using System.Net;
using System.IO;
protected void Page_Load(object sender, EventArgs e)
{
string url = @"http://www.gmail.com";
HttpWebRequest reqObj = (HttpWebRequest)WebRequest.Create(url);
reqObj.Method = "GET";
HttpWebResponse resObj = (HttpWebResponse)reqObj.GetResponse();
StreamReader sr = new StreamReader(resObj.GetResponseStream());
string result = sr.ReadToEnd();
Response.Write(result);
}
No comments:
Post a Comment