zoukankan      html  css  js  c++  java
  • 服务端代码与接口页面post交互

    webclient对象实现

    WebClient wb = new WebClient();                        

    System.Collections.Specialized.NameValueCollection varPost = new System.Collections.Specialized.NameValueCollection();  

    参数对象,对方页面接收                                 

    varPost.Add("a", a);                        

    varPost.Add("b", b);

    varPost.Add("c", c);

    byte[] RemoteInfo = wb.UploadValues(requestUrl, "POST", varPost);          

    页面应答返回              

    string sRemoteValue = System.Text.Encoding.UTF8.GetString(RemoteInfo);

  • 相关阅读:
    CLR Via
    HTML&XML
    SNS研究
    DotNet&C#
    电子商务
    WCF学习
    SQL
    构架设计
    JS&Ajax
    NHibernate之旅系列文章导航
  • 原文地址:https://www.cnblogs.com/Charles-xu/p/4913499.html
Copyright © 2011-2022 走看看