一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

利用WebClient和WebRequest类获得网页源代码

时间:2022-07-02 18:04:17 编辑:袖梨 来源:一聚教程网

GetURLHtml.aspx
<%@ Page language="c#" Codebehind="GetURLHtml.aspx.cs" Src="GetURLHtml.aspx.cs" AutoEventWireup="false" Inherits="Lion.Web.Forum.WebForm1" %>
>
 
  Lion互动网络=>利用WebClient和WebRequest类获得网页</a>源代码
  
 
 
  

   http://www.lionsky.net/mywebsite/index.aspx
    
   

   
  

 

GetURLHtml.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;
namespace Lion.Web.Forum
{
 ///
 /// WebForm1 的摘要说明。
 ///

 public class WebForm1 : System.Web.UI.Page
 {
  protected System.Web.UI.WebControls.TextBox TextBox1;
  protected System.Web.UI.WebControls.Button Button1;
  protected System.Web.UI.WebControls.Button Button2;
  protected System.Web.UI.WebControls.TextBox UrlText;
  protected System.Web.UI.WebControls.TextBox ContentHtml;
  protected System.Web.UI.WebControls.TextBox TextBox2;

热门栏目