比如有个简单的页面a.aspx,上面有一个TextBox t,一个Button b,在b的OnClick事件里根据t的输入内容查数据库,然后Response.Write(查到的内容).  然后我在另外一个程序里模拟提交过程,把需要的数据post给这个页面,代码如下:
  string postStr = "t=aa";
    byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(postStr);
  WebRequest req = WebRequest.Create("http://localhost/test/a.aspx");
    HttpWebRequest httpReq = (HttpWebRequest)req;
    httpReq.ContentType = "application/x-www-form-urlencoded";
    httpReq.Method = "POST";
    httpReq.ContentLength = bytes.Length;
  Stream write = httpReq.GetRequestStream();
    write.Write(bytes, 0, bytes.Length);
    write.Close();
    HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
    Stream rstream = resp.GetResponseStream();
    StreamReader reader = new StreamReader(rstream, Encoding.Default);
    FileStream sss = new FileStream(Server.MapPath("ee.txt"), FileMode.Create);
    StreamWriter ww = new StreamWriter(sss, Encoding.Default);
    ww.Write(reader.ReadToEnd() + "\r\n");
    ww.Close();
    sss.Close();
    resp.Close();
  返回的东西只有页面本身的内容,而没有Response写出的内容,大概是没有收到t的值吧,请问这是为什么.而且这样提交给类似的asp,jsp,php,shtml等页面都能收到正确的返回,急,请大家帮帮忙!