Post请求:

    string postData = "user=123&pass=456"; // 要发放的数据
byte[] byteArray = Encoding.UTF8.GetBytes(postData); HttpWebRequest objWebRequest = (HttpWebRequest)WebRequest.Create("http://www.abc.com/a.aspx");
objWebRequest.Method = "POST";
objWebRequest.ContentType = "application/x-www-form-urlencoded";
objWebRequest.ContentLength = byteArray.Length;
Stream newStream = objWebRequest.GetRequestStream();
// Send the data.
newStream.Write(byteArray, , byteArray.Length); //写入参数
newStream.Close(); HttpWebResponse response = (HttpWebResponse)objWebRequest.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.Default);
string textResponse = sr.ReadToEnd(); // 返回的数据

接收参数:string a= Request.Form["user"];

最新文章

  1. 使用ajaxfileupload插件进行Ajax Post 异步提交多个文件
  2. 为何重写toString方法后会使哈希码能够打印出来
  3. MyBatis学习笔记(二) 关联关系
  4. 教育行业SaaS选型 需要注意的三点问题
  5. 国外一些好用的UX/UI设计工具和资源分享
  6. Nginx+keepalived做双机热备加tomcat负载均衡
  7. Quartz.NET学习系列
  8. PHP 15:异常
  9. VS2013中使用QT插件后每次重新编译问题
  10. scanf函数与scanf_s函数
  11. javascript 函数和作用域(闭包、作用域)(七)
  12. 【机器学习基础】熵、KL散度、交叉熵
  13. [转载]EXCEL绝对引用中$A$1、A$1、$A1三个的区别?
  14. 关于:无法创建链接服务器 "ORCL" 的 OLE DB 访问接口 "OraOLEDB.Oracle" 的实例 (错误:7302)
  15. 第一章 Python基本语法
  16. GUI学习之八——复选框QCheckBox的学习总结
  17. linux ./configure check your system clock
  18. WPF 带清除按钮的文字框SearchTextBox
  19. [Leetcode]315.计算右侧小于当前元素的个数 (6种方法)
  20. Js_特效

热门文章

  1. uva 280 - Vertex
  2. c# 基础复习1
  3. 总结 xib
  4. QT 串口通信 数据16进制发送
  5. DDUI For Delphi Seattle Directui界面组件
  6. bzoj2929 [Poi1999]洞穴攀行
  7. poj3667---Hotel 线段树区间合并,区间更新
  8. Hash Map (Hash Table)
  9. One手动玩转
  10. hdu 5422 Rikka with Graph(简单题)