为什么不能发现提交的数据,是没有提交上去???
// 发送数据
string url = "http://localhost/WebApplication1/WebForm2.aspx";
string postData = "txtWriterName="+HttpUtility.UrlEncode("gaoshanshan")+
"&txtContent="+HttpUtility.UrlEncode("你好!这是我的留言内容");
byte[] byteData = Encoding.GetEncoding("gb2312").GetBytes(postData);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentLength = postData.Length;
request.ContentType = "application/x-www-form-urlencoded";
Stream stream = request.GetRequestStream();
stream.Write(byteData,0,byteData.Length);
stream.Close();