惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
IT之家
IT之家
Engineering at Meta
Engineering at Meta
博客园 - 【当耐特】
J
Java Code Geeks
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
M
MIT News - Artificial intelligence
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
腾讯CDC
大猫的无限游戏
大猫的无限游戏
U
Unit 42
爱范儿
爱范儿
美团技术团队
T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
D
Docker
Google DeepMind News
Google DeepMind News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗

博客园 - 烈马狂生

.net dll热插拔 收藏javascript 收藏flex开发 静态类 .net中简单的记录日志的办法 webservice调用的两种方法 virtual pc .netframework中的集合 Com Com+ .Net SSL和Https 关于高安全性的webservice处理 css总结 项目开发所需文档 [转]sql优化 在“运行”中常执行的命令。 软件开发分析的步骤 FCKeditor 一段js代码的分析 json
程序post - 烈马狂生 - 博客园
烈马狂生 · 2008-12-08 · via 博客园 - 烈马狂生

            ASCIIEncoding encoding = new ASCIIEncoding();
            
string postData = "srh_type=0";
            postData 
+= "&cityid=0101";
            postData 
+= "&price=-1";
            postData 
+= "&star=-1";

            postData 

+= "&__EVENTTARGET=Search1$Pager";
            postData 
+= "&__EVENTARGUMENT=1";byte[] data = encoding.GetBytes(postData);// Prepare web request
            HttpWebRequest myRequest =
            (HttpWebRequest)WebRequest.Create(
"http://**");

            myRequest.Method 

= "POST";
            myRequest.ContentType 
= "application/x-www-form-urlencoded";
            myRequest.ContentLength 
= data.Length;
            Stream newStream 
= myRequest.GetRequestStream();// Send the data.
            newStream.Write(data, 0, data.Length);
            newStream.Close();
// Get response
            HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
            StreamReader reader 
= new StreamReader(myResponse.GetResponseStream(), Encoding.Default);
            
string content = reader.ReadToEnd();
            Response.Write(content);