Using WebClient C #

I saw some links that tell how to use the web client, but one thing is still not clear to me, since I'm not a sharp developer.

  • Dose it implements post
  • Difference Between HttpWebRequest
  • How to determine the fields from the source of the page in which the values ​​should be placed.
  • How values ​​should be placed

I studied http://www.daveamenta.com/tag/webclient/

It would be great if someone gave an example of html feilds and how to use them in a web client

+3
source share
3 answers

This implements POST

Yes, you can use methods UploadString, UploadDataandUploadValues

Difference Between HttpWebRequest

, WebClient WebRequest (FtpWebRequest, HttpWebRequest...), . ,

,

, ...

? UploadValues, , HTML- POST

+2

webclient - -,

webclient client= new webclient();
string content = client.downloadstring('google'.com');

To load a page using webclient is simple but with difficulty httprequest.

A simple thing can be done by the web client without writing many lines of code.

but many difficult ones cannot yet be performed in the web client.

so just HttpWebRequest is better than a web client.

see here a small example

http://geekswithblogs.net/anirudha/archive/2010/07/25/parsing-text-in-c-sharp.aspx

+1
source

Source: https://habr.com/ru/post/1781043/


All Articles