HQT

追求.NET 技术永无止境

导航

2005年10月8日

摘要: 使用 .NET 的 HttpWebRequest 可轻松实现站外提交功能, 代码如下: ASCIIEncoding encoding=new ASCIIEncoding(); string postData="TextBox1=33&Button1=Button"; byte[] data = encoding.GetBytes(postData); // Prepare web request HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://localhost/testform1.aspx"); myRequest.Method = "POST"; myRequest.ContentType="application 阅读全文

posted @ 2005-10-08 15:13 HQT 阅读(7932) 评论(2) 推荐(0) 编辑