这份资源 我找了很久 终于找到了! 非常感谢提供这份资源的人,你很牛B!
原链接: http://www.7net.cn/web/sitetech/ASPbiancheng/200908181503.html
原作者: long80226
修改: 余书懿
代码如下:
string LoginPsd = ""; LoginPsd = Request["LoginPsd"].ToString().Trim(); byte[] bs = Encoding.ASCII.GetBytes("PassWord=" + LoginPsd);//传参入口 HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("http://10.125.33.22/U9Login/U9Login.aspx");//Url req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; req.ContentLength = bs.Length; Stream reqStream = req.GetRequestStream(); reqStream.Write(bs, 0, bs.Length); reqStream.Close(); HttpWebResponse myResponse = (HttpWebResponse)req.GetResponse(); StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.GetEncoding("GB2312")); LoginPsd = reader.ReadToEnd();//返回HTML流 reader.Close(); myResponse.Close();
余书懿
2011年5月2号