Welcome![Sign In][Sign Up]
Location:
Search - webclient uploaddata csharp

Search list

[CSharpc2008_HTTP

Description: C#里System.Web空间下提供了一个叫做WebClient的对象,使用此对象就可以使C#直接对服务器发送WEB客户端的请求。那么我们要对服务器提交POST方法那么就必须使用其UploadData()方法才行。首先把要请求的信息先转换为字节(因为POST提交的是字符的流数据),然后再做为UploadData()的参数。使用UploadData()进行数据提交,最后返回,POST的回馈信息。如下: -C# Lane System.Web to provide a space called the WebClient object, you can use this object to make C# Directly to the WEB server send the client request. So we have to submit to the server POST method then you must use its UploadData () methods do. First to request the information was first converted to byte (because POST is the flow of data characters), and then again for UploadData () parameters. Use UploadData () for data submission, the final return, POST information feedback. As follows:
Platform: | Size: 8192 | Author: lanzyer | Hits:

CodeBus www.codebus.net