易截截图软件、单文件、免安装、纯绿色、仅160KB

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)
    {
    }
 


相关文档:

开源的网页抓取项目HTML Parser 介绍

HTML Parser is a Java library used to parse HTML in either a linear or nested fashion. Primarily used for transformation or extraction, it features filters, visitors, custom tags and easy to use JavaBeans. It is a fast, robust and well tested package.
code  download:http://sourceforge.net/pr ......

将指定的表/视图中的数据导出为 html 文件

IF OBJECT_ID(N'dbo.p_ExportHtml') IS NOT NULL
    DROP PROC dbo.p_ExportHtml;
GO
/*-- == 导出表/视图中的数据为html 文件======================
此存储过程用于将指定的表/视图中的数据导出为 html 文件
由于是使用存储过程, 因此文件目录基于 sql server 服务器
存储过程中会使用xp_cmdshell ......

Flex 用Grid实现类似于Html的细线表格

我们在用Flex进行开发的时候,有时候需要实现像html 细线表格的那种效果,原理很简单,但是需要一些技巧,不然的话很难控制线条的粗细,其实只需要设置几个样式就能搞定,一下是源码,大家可以运行一下看看效果<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml ......

HTML的DOM操作例子

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>use html as DOM</title>
<mce:script language="javascript" type="text/javascript"><!--
function addUser() {
// get and execute na ......

Struts HTML标签

Struts HTML标签 
<html:html>标签
属性的作用:
lang: 值为true时,就根据存储在HttpSession中的Locale对象来输出网     页使用的语言。如果不存在session或session中没有Locale对象,     就以Http请求头中的Accept-language属性来设置输出语言。如果 &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号