我的完全可以,请黏贴如下代码看看呢?(我用maxthon最新版本的):
以下是aspx代码:
<%@
page
language="c#"
autoeventwireup="true"
codebehind="webform7.aspx.cs"
inherits="testwebdemo.webform7"
enableviewstate="false"
%>
html
public
"-//w3c//dtd
xhtml
1.0
transitional//en"
"
http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
xmlns="
http://www.w3.org/1999/xhtml">
先读取页面内容,然后用IO写入HTML
HttpWebRequest wReq = (HttpWebRequest)WebRequest.Create("http://www.crazycoder.cn/");
wReq.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50215; " + Guid.NewGuid().ToString() + ")";
HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse;
wReq.AllowAutoRedirect = true;
// 获取输入流
System.IO.Stream respStream = wResp.GetResponseStream();
System.IO.StreamReader reader = new System.IO.StreamReader(respStream, encode);
string content = reader.ReadToEnd();
reader.Close();
reader.Dispose();
respStream.Close();
respStream.Dispose();
wResp.Close();
这个问题好像不太好弄