• System.Collections.Specialized.NameValueCollection PostVars


    System.Net.WebClient WebClientObj = new System.Net.WebClient();WebClientObj.Headers.Add("Content-Type ", "text/html; charset=iso-8859-1");#region XXXSystem.Collections.Specialized.NameValueCollection PostVars= new System.Collections.Specialized.NameValueCollection();PostVars.Add("Address", address);PostVars.Add("Estate", louPan);PostVars.Add("Bigarea", quyu);PostVars.Add("Remark", reamrk);PostVars.Add("Build_year", "2010");PoPostVars.Add("chengzuType", chengzuType);#endregionif (type == "求购" || type == "出售"){PostVars.Add("Sale_unitprice", price.ToString());//sbr.Append("&Sale_unitprice=" + Encod(price.ToString()));}else if (type == "求租" || type == "出租"){PostVars.Add("Rent_price", price.ToString());//sbr.Append("&Rent_price=" + Encod(price.ToString()));}#try{string url = "这里是对方提供的地址";WebClientObj.UploadValues(url, "POST", PostVars);}catch (Exception ex){Session["loginError"] = ex.Message;}
  • 相关阅读:
    URI 和 URL
    TCP/IP协议
    TCP/IP 通信传输流
    Python 之 函数可变参数和关键字参数
    Python 之装饰器decorator
    Python 之进程
    Android
    Redis持久化(persistence)
    python正则表达式
    selenium+python定位iframe元素
  • 原文地址:https://www.cnblogs.com/welcomesay/p/1725831.html
Copyright © 2020-2023  润新知