ASP.NET POST方式提交数据!
来源:互联网 发布:mac appstore 换帐号 编辑:程序博客网 时间:2024/05/17 20:35
string url = "网址";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
string s = "要提交的数据";
byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes (LoginInfo);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = requestBytes.Length;
Stream requestStream = req.GetRequestStream();
requestStream.Write(requestBytes,0,requestBytes.Length);
requestStream.Close();
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.Default);
string backstr = sr.ReadToEnd();
Response.Write(line);
sr.Close();
res.Close();
- ASP.NET POST方式提交数据!
- ASP.NET POST方式提交数据
- asp.net 数据提交中的GET,POST, PUT,DELETE,四种方式
- asp.net JS+form表单Post和Get方式提交数据
- POST 提交数据方式
- POST提交数据方式
- ASP.NET GET 方式提交数据!
- asp.net页面的提交方式POST和GET 区别
- asp.net Post Get提交数据转Model实例
- php post方式提交数据
- 使用Post方式提交数据
- 使用Post方式提交数据
- 使用Post方式提交数据
- Android Post方式提交数据
- ASP.NET以Post方式向网页发送数据
- asp.net form post 提交 asp.net js form 提交
- asp.net ajax post方式
- Asp.net常见提交方式
- 11月14日 超兴奋后的超级郁闷
- 在Eclipse中使用SWT进行界面设计
- 论取经途中孙悟空为什么屡战屡败之真正原因(转贴)
- ASP.NET GET 方式提交数据!
- Map的实现
- ASP.NET POST方式提交数据!
- 跨站Script攻击 Author: Hoky.pRo
- 兰陵王•柳阴直
- SQL注入路径问题 作者:孤光剑隐
- 第一次使用Blog
- 什么是webservicse, 作什么用的
- ADO.Net:从DataReader中获取数据表的Schema信息
- 反思
- 终于有了自己的blog,发文庆祝一下