表单提交可以了,登陆后竟然显示的全部是框架......,显示的代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>cwchyt-用户管理后台</title>
</head><frameset rows="*" cols="156,8,*" framespacing="0" frameborder="0" border="false" id="frame" scrolling="yes"><frame name="left" scrolling="auto" marginwidth="0" marginheight="0" src="user_top.asp?actiontype=left"><frame src="user_top.asp?actiontype=center" scrolling="no"><frame name="main" scrolling="auto" marginwidth="0" marginheight="0" src="user_index.asp?actiontype=main"></frameset><noframes></noframes></html>有没有办法把框架里面的内容也显示出来?
如果需要HttpWebResponse跳转,应该怎样设置?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>cwchyt-用户管理后台</title>
</head><frameset rows="*" cols="156,8,*" framespacing="0" frameborder="0" border="false" id="frame" scrolling="yes"><frame name="left" scrolling="auto" marginwidth="0" marginheight="0" src="user_top.asp?actiontype=left"><frame src="user_top.asp?actiontype=center" scrolling="no"><frame name="main" scrolling="auto" marginwidth="0" marginheight="0" src="user_index.asp?actiontype=main"></frameset><noframes></noframes></html>有没有办法把框架里面的内容也显示出来?
如果需要HttpWebResponse跳转,应该怎样设置?
解决方案 »
- 关于vs 2010(c#)调用皮肤空间Uskin.dll
- webservice 多线程问题????????急
- DataGridViewCell重写之后,背景色没有了
- 怎么将 DataGridViewCheckBoxColumn 的列头设置为checkbox
- 获取webbrowser页面里的验证码出现问题
- 两个WebBrowser 调用Html页 打开在第二个WebBrowser
- 打开窗口的问题
- 关于模板列中的radiobutton使用问题
- 请教高手:在aspx页面中的控件事件如何与cs页面中的事件相关联?
- 请教c#高手
- 已经三天了。。。。请大家帮忙想想问题所在。。。。
- 不怕不知道,就怕吓一跳!
string html = "";
private string req(string postdata)
{
//*****************设置发送时的初始化*****************
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.hzxsjy.com/blog/login.asp");
CookieContainer cook = new CookieContainer();
byte[] bData = null;
bData = Encoding.GetEncoding("gb2312").GetBytes(postdata);
request.ContentLength = bData.Length;//要发送数据的字节长度
request.Method = "Post"; //协议方法
request.ContentType = "application/x-www-form-urlencoded"; //请求类型
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)";
request.KeepAlive = true;//持久性连接
request.CookieContainer = cook;
request.AllowAutoRedirect = true; //*************向网站通过POST发送数据*********************** Stream newStream = request.GetRequestStream();//创建流
newStream.Write(bData, 0, bData.Length); //将要发送的字节数组写入流
newStream.Close();//关闭
request.AllowAutoRedirect = true;
//****************接收返回的数据********************
HttpWebResponse rep = (HttpWebResponse)request.GetResponse(); //返回对请求的相应
rep.Cookies = cook.GetCookies(rep.ResponseUri);
cook.Add(rep.Cookies);
Stream s = rep.GetResponseStream();//获取返回的数据流(字节序列)
//****************将接收的数据读入内存***********************
StreamReader sr = new StreamReader(s, Encoding.GetEncoding("gb2312"));
html = sr.ReadToEnd(); sr.Close();
s.Close();
return html;
}
public void Start()
{
string postdata = "username=cwchyt&password=750112&CookieDate=0";
string aa= req(postdata);
}
frame 自己得到 source 之後,進行分析,再次 request 對應的 frame。