分类: ASP.NET 配置 2011-05-20 16:02 59人阅读 收藏 举报
- Global.asax:
- <%@ Application Language="C#" Inherits="路径.Global" CodeBehind="Global.cs"%>
- Global.cs:
- public class Global : System.Web.HttpApplication
- {
- public static Timer gtimer = null;
- protected void Application_Start(object sender, EventArgs e)
- {
- gtimer = new Timer(1000000);
- gtimer.Elapsed += new System.Timers.ElapsedEventHandler(this.TimerEventFunction);
- gtimer.AutoReset = true;
- gtimer.Enabled = true;
- }
- protected void TimerEventFunction(Object sender, ElapsedEventArgs e)
- {
- }
- }