Home All Groups Group Topic Archive Search About

webclient class usage

Author
7 Jul 2006 2:24 PM
FutDev
Hello,

I'm trying to input data into a web page and read the response page. This is
easy enough with the webbrowser class but I cant get it to work with the
webclient class. I've tried all the UploadValues, UploadData methods etc but
they all seem to just reload the input page. How do I get the response page?

Author
9 Jul 2006 9:11 AM
Joerg Jooss
Thus wrote FutDev,

> Hello,
>
> I'm trying to input data into a web page and read the response page.
> This is easy enough with the webbrowser class but I cant get it to
> work with the webclient class. I've tried all the UploadValues,
> UploadData methods etc but they all seem to just reload the input
> page. How do I get the response page?

The web site probably requires cookies or checks the User-Agent header, none
of which are present if you use a bare bones WebClient instance. Try adding
potentially required HTTP headers -- you can use a tool like Fiddler to analyze
the HTTP traffic.

Cheers,
--
Joerg Jooss
news-re***@joergjooss.de

AddThis Social Bookmark Button