WebClientºÍWebRequest»ñÈ¡html´úÂë
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 id="Head1" runat="server">
<title>µÃµ½ÍøÒ³Ô´´úÂë</title>
</head>
<body MS_POSITIONING="GridLayout">
<form id="aspNetBuffer" method="post" runat="server">
<div align="center" style="FONT-WEIGHT: bold">µÃµ½ÈÎÒâÍøÒ³Ô´´úÂë</div>
<asp:TextBox id="UrlText" runat="server" Width="400px">http://dotnet.aspx.cc/content.aspx
</asp:TextBox>
<asp:Button id="WebClientButton" Runat="server" Text="ÓÃWebClientµÃµ½" OnClick="WebClientButton_Click"></asp:Button>
<asp:Button id="WebRequestButton" runat="server" Text="ÓÃWebRequestµÃµ½" OnClick="WebRequestButton_Click"></asp:Button>
<asp:TextBox id="ContentHtml" runat="server" Width="100%" Height="360px" TextMode="MultiLine">
</asp:TextBox>
</form>
</body>
</html>
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;
using System.IO;
using System.Net;
using System.Text;
public partial class _Default : System.Web.UI.Page
{
private string PageUrl = "";
protected void Page_Load(object sender, EventArgs e)
{
}
Ïà¹ØÎĵµ£º
IF OBJECT_ID(N'dbo.p_ExportHtml') IS NOT NULL
DROP PROC dbo.p_ExportHtml;
GO
/*-- == µ¼³ö±í/ÊÓͼÖеÄÊý¾ÝΪhtml Îļþ======================
´Ë´æ´¢¹ý³ÌÓÃÓÚ½«Ö¸¶¨µÄ±í/ÊÓͼÖеÄÊý¾Ýµ¼³öΪ html Îļþ
ÓÉÓÚÊÇʹÓô洢¹ý³Ì, Òò´ËÎļþĿ¼»ùÓÚ sql server ·þÎñÆ÷
´æ´¢¹ý³ÌÖлáʹÓÃxp_cmdshell ......
×Ö·û
Ê®½øÖÆ×Ö·û±àºÅ
ʵÌåÃû×Ö
˵Ã÷
---
�
---
δʹÓÃUnused
---

---
δʹÓÃUnused
---

---
δʹÓÃUnused
---

---
δʹÓÃUnused
---

---
δʹÓÃUnused
---

---
δʹÓÃUnused
---

---
δʹÓÃUnused
---

......
ÎÊÌ⣺htmlÔªËØÈçºÎ¹¹³ÉÎĵµ
½â¾ö·½°¸£ºhtmlÊÇÑϸñµÄÔªËزã´ÎǶÌ׽ṹ£¬ÔªËØ¿ÉÒÔ»¥ÏàǶÌ×£¬µ«ÊDz»ÄÜÖصþ¡£Html½«ÔªËØ»®·ÖΪ3¸öÖ÷ÒªÀࣺ½á¹¹»¯ÔªËØ£¬¿é×´ÔªËØ£¬ÄÚÁªÔªËØ¡£
n ºËÐĵĽṹ»¯ÔªËØ£º<html><head><body>£¬<head>ÖзŵÄÊǹØÓÚÎĵµµÄÐÅÏ ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>ÓÃjavascript¶¯Ì¬Ìí¼Óɾ³ýhtmlÔªËØ</title>
<script type="text/javascript"><!--
function $(nodeId) {
re ......
System.Net.WebRequest request = System.Net.WebRequest.Create("http://la.jmw.com.cn/c.asp");
request.UseDefaultCredentials = false;
System.Net.WebResponse response = requ ......