WebRequest myRequest = WebRequest.Create("http://MyApplication/MyPage.aspx");
WebResponse myResponse = myRequest.GetResponse();
Stream ReceiveStream = myResponse.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader readStream = new StreamReader( ReceiveStream, encode );
Char[] read = new Char[256];
int count = readStream.Read( read, 0, 256 );
using (StreamWriter sw = new StreamWriter("MyPage.htm"))
{
while (count > 0)
{
// Dump the 256 characters on a string and display the string onto the console.
String str = new String(read, 0, count);
sw.Write(str);
count = readStream.Read(read, 0, 256);
}
}
myResponse.Close();
prolly like that and it was the first link in google..