我爱Aspx >> Asp.Net >> 利用WebClient和WebRequest类获得网页源代码<asp:TextBox id="UrlText" runat="server" Width="400px">http://dotnet.aspx.cc/content.aspx
</asp:TextBox>
<asp:Button id="WebClientButton" Runat="server" Text="用WebClient得到"></asp:Button>
<asp:Button id="WebRequestButton" runat="server" Text="用WebRequest得到"></asp:Button>
<br>
<asp:TextBox id="ContentHtml" runat="server" Width="100%" Height="360px" TextMode="MultiLine">
</asp:TextBox>
</form>
</body>
</HTML>
GetPageHtml.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
Ҷƪл˵?
使用ASP.NET中调用WebService时不..[05-20]
利用SOAP(Webservice)上传文件[05-20]
用ASP编程控制在IIS建立Web站点[05-20]
web.config文件详解[05-20]
ASP.NET:Email Web Page[05-20]
在asp.net2.0中用WebPart代替Pla..[05-20]
用C#写一个Web自定义控件[05-20]
用C#写一个Web自定义控件[05-20]
Ajax: 一个建立Web应用的新途径[05-20]
设置WEB(INTERNET)打印页眉页脚为..[05-20]
通过ASP.NET远程杀死进程[05-20]
Asp.net中DataGrid控件的自定义分..[05-20]
使用ASP.NET中调用WebService时不..[05-20]
在系统菜单中添加自定义菜单项[05-20]
利用SOAP(Webservice)上传文件[05-20]
利用ASP.NET实现域名查询[05-20]
网页防刷新重复提交、防后退解决..[05-20]
IE经典故障大全[05-20]
用ASP的方法动态写出JavaScript的..[05-20]
JavaScript 更改网页中字体大小,..[05-20]