Here is how I would handle this:
string url =
http://www.somesite.com/somepage.html;
HttpWebRequest request = HttpWebRequest.Create(url);
HttpWebResponse response = request.GetResponse();
You can then stream it into output
StreamReader reader = new StreamReader(response.GetResponseStream);
string responseString = reader.ReadToEnd();
You can also process the stream as it comes across.
string line;
while(null != (line = reader.ReadLine())
{
//Get rid of lines you do not want, etc.
}
I like this method, as it gives you a lot of control. I would have to look,
as you might be able to do this, as well.
//Per
http://www.4guysfromrolla.com/webtech/070601-1.shtml
StreamReader reader = new StreamReader(objWebClient.DownloadData(strURL));
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#
or just read it:
http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************
<so******@yahoo.comwrote in message
news:83**********************************@a70g2000 hsh.googlegroups.com...
Hi,
I wanted to make a page where I can send a request to another page,
and read it's response back, can someone point me to an example? it's
just a basic page i need to hit, i can hit it directly with my
browser, no user/pass, but i want to read whats returned into a
webpage, it's going to come back as html, wasn't sure if there's a
control to just display whats returned, otherwise i can parse it, but
main thing was how to send a request to another page and catch the
response back.
Thanks!