<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetPage.aspx.cs" Inherits="GetPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>获取任意网页HTML代码</title>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align:center;">
<asp:TextBox ID="UrlText" runat="server" Width="400" Text="
http://www.gsdesign.cn"></asp:TextBox>
<asp:Button ID="WebClientButton" runat="server" Text="用WebClient得到" OnClick="WebClientButton_Click" />
<asp:Button ID="WebRequestButton" runat="server" Text="用WebRequest得到" OnClick="WebRequestButton_Click" />
<br />
<asp:TextBox ID="ContentHtml" runat="server" Width="100%" Height="360" TextMode="MultiLine"></asp:TextBox>
</div>
</form>
</body>
</html>