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

asp.net自动执行任务

在复杂的业务应用程序中,有时候会要求一个或者多个任务在一定的时间或者一定的时间间隔内计划进行,比如定时备份或同步数据库,定时发送电子邮件,定期处理用户状态信息,支付系统中定期同步异常账单等等,我们称之为计划任务。实现计划任务的方法也有很多,可以采用SQLAgent执行存储过程,采用Windows任务调度程序来实现,也可以使用Windows服务来完成我们的计划任务,这些方法都是不错的解决方案。但是,以上这些都需要有服务器的权限才能进行,而对于虚拟主机客户使用的Web应用程序来说,这些方法实现起来并不是很简单的,主机服务提供商或者不能直接提供这样的服务,或者需要你支付许多额外的费用。 看过一些这方面的文章,发现有一个共同的缺点:IIS运行到一定时期,计划任务就停止了。查找原因发现是IIS的应用程序池定期回收导致计划任务停止。本文的这个方法可以解决应用程序池回收问题。
Global.asax.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Timers;
using System.Net;
using System.IO;
using System.Text;
using System.Threading;
namespace qumiao.com
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            //定义定时器 
            System.Timers.Timer myTimer = new System.Timers.Timer(5000);
            myTimer.Elapsed += new ElapsedEventHandler(myTimer_Elapsed);
            myTimer.Enabled = true;
        


相关文档:

asp/asp.net连接sql anywhere数据库


<%
set conn= server.createobject("ADODB.connection")
conn.open "driver={sybase driver 10};"
"srvr=SYBASE;"
"UID=sa;"
"pwd=sybase;"
sql="select no from tab_st ......

解决asp.net页面插入数据时权限不足问题

static void Main(string[] args)
  {
  string connstr = "Data Source=***;user=system;password=***;";
  OracleConnection conn = new OracleConnection(connstr);
  conn.Open();
  string orclstr="insert into SYS.A_MODULE values('03','查看生产任务','查看生产任务进度')";
  ......

Cookie应用完全解析(一):asp.net中Cookie技术

Cookie 是什么?
 
在asp.net中,如何使用?
 
 
 
1   Cookie 是什么?
 
Cookie:电脑中记录用户在网络中的行为的文件;网站可通过Cookie来识别用户是否曾经访问过该网站。(摘自 http://gb.cri.cn/17004/2007/03/08/121@1487554.htm)
2在asp.net中,如何使用?
 
& ......

asp.net GridView的一些应用

应用1:GridView和CheckBox结合
效果图:
应用2:Extending the GridView Control
Code download available at: CuttingEdge05.exe (132 KB)
Browse the Code Online
 Contents
The GridView Difference
A New GridView Control
Adding a Checkbox Column
The New Grid In Action
Styling Selected ......

asp.net模态窗口每次进入不刷新问题

模态窗口每次页面重新打开不刷新。
缓存的原因,改成这样:
解决办法。。。
url   =   frmWin   +   "? "   +   Math.random();
window.showModalDialog(url,me, 'dialogWidth= '+width   + 'px;dialogHeight= '+height+ 'px;help:no;status:no;resizable:no;scro   ll:no; ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号