|
发表于 2013-8-31 12:56:59
|
显示全部楼层
同求解决此问题。
posturl=http://www.uuplay.com/game/Login_Form.aspx?server=95&game=9&signonForwardAction=http%253A%252F%252Fwww.uuplay.com%252Fgame%252FLogin.aspx%253Fgame%253D9%2526server%253D95- private void denglu_Click(object sender, EventArgs e)
- {
- HttpItem item = new HttpItem()
- {
- URL = tempurl,
- Accept = "text/html, application/xhtml+xml, */*",
- ContentType = "application/x-www-form-urlencoded",
- Method="post",
- Cookie=cookie,
- UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)",
- };
- item.Postdata = string.Format("email={0}&display=&password={1}&validcode={2}&submit_login=", HttpUtility.UrlDecode(txtzhanghao.Text.Trim()), HttpUtility.UrlDecode(txtmima.Text.Trim()), HttpUtility.UrlDecode(txtyanzhengma.Text.Trim()));
- //richTextBox1.AppendText(item.Postdata + "\r\n\r\n");
- HttpResult result = http.GetHtml(item);
- string html = result.Html;
- richTextBox1.AppendText(html + "\r\n\r\n");
- }
复制代码 结果返回“必须先将 ContentLength 字节写入请求流,然后再调用 [Begin]GetResponse。” |
|