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

ASP.NET取网页数据《数据采集》


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string strURl = "http://www.jxflcp.net/ssc/";//换成你要的那个网址
        string str = GetHttp(strURl);
        if (str != "xx")
        {
            //换成你想要截取网页部分内容的代码
            Regex reg = new Regex(@"<td width=""100"" height=""22"" style=""font-size: 14px;font-weight: bold;color: #006600;"">(\d+)</td>[\s\r\n]*<td width=""80""  style=""font-size: 14px;font-weight: bold;color: #0099FF;"">([\d\s\:]+)</td>[\s\r\n]*<td width=""100"" style=""font-size: 14px;font-weight: bold;color: #cc0000;"">([\d,\s]+)</td>");
            if (reg.IsMatch(str))
            {
                MatchCollection mc = reg.Matches(str);
                foreach (Match m in mc)
                {
                    Response.Write(m.Result("


相关文档:

asp.net中简单的邮件发送,供取回密码!

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Mail;
using System.Net.Mime;
using System.Net.Configuration;
namespace BCore.PubFunction
{
    public class MailHandler
    {
   &n ......

ASP.NET拆分单元格方法

 protected void Unite(GridView gv)
    {
        int i;
        string LastType1;
        int LastCell;
        if (gv.Rows.Count > ......

asp.net中显示在线用户


asp.net中显示在线用户
private static System.Threading.Timer timer;
private const int interval = 1000 * 60 * 20;//检查在线用户的间隔时间
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
public Global()
{
Initialize ......

ASP.NET连接各类数据库集锦

1.C#连接连接Access
程序代码:
------------------------------------------------------------------------------- using System.Data;
using System.Data.OleDb;
..
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:BegASPNETNorthwind.mdb";
Ol ......

ASP.NET的ACCESS数据库操作类

//private string datapatch = ConfigurationSettings.AppSettings["acessconn"];//数据库地址 
private string datapatch = "db/global.asa";//数据库地址 
/// 
/// 取得dataset 
// 
/// 查询语句 
/// 
public DataSet GetDataSet(string Commandtext) 
{&nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号