Here a very simple sample:

WebRequest myRequest = WebRequest.Create("http://www.contoso.com";);
WebResponse myResponse = myRequest.GetResponse();
StreamReader sr = new StreamReader(myResponse.GetResponseStream());
String html = sr.ReadToEnd();
sr.Close();
myResponse.Close();

Pierre

-----------------------------------------------
Pierre Greborio
[EMAIL PROTECTED]
http://www.pierregreborio.it
-----------------------------------------------



-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Raphael Nascimento
Sent: Saturday, May 25, 2002 10:28 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Http Request


How can i get the html with a HttpWebRequest?

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to