I have seen some links that tells how to use web client but one thing is still un clear to me as i am not sharp developer.
I studied http://www.daveamenta.com/tag/webclient/
It would be great if some one gives an example of html feilds and how to use them in web client
Does this implements POST
Yes, you can use the UploadString, UploadData, and UploadValues methods
Difference between HttpWebRequest
Basically, WebClient is just a wrapper for WebRequest (FtpWebRequest, HttpWebRequest...), to make it easier to use. It doesn't give you as much control, but it's enough for simple scenarios
How to determine Fields from page source in which values are to be placed
I don't really understand what you mean...
How values should be placed
Are you talking about form fields? You can use the UploadValues method, which does the same as submitting an HTML form with POST
MSDN is the best place to get exact answers for .Net stuff.
Here's an article on WebClient versus HttpWebRequest. Basically WebClient is designed to be quick and easy. HttpWebRequest is more complex, but more powerful.
http://blogs.msdn.com/b/silverlight_sdk/archive/2008/04/01/using-webclient-and-httpwebrequest.aspx
There has also been lengthy discussion on this topic on SO before:
WebClient vs. HttpWebRequest/HttpWebResponse
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With