日期:2014-05-17 浏览次数:20476 次
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
//using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Threading;
public partial class Test : System.Web.UI.Page
{
static int a = 0;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Test b = new Test();
AutoResetEvent myResetEvent = new AutoResetEvent(false);
TimerCallback timerDelegate = new TimerCallback(b.test);
Timer c = new Timer(timerDelegate, null, 0, 1);
}
public void test(object b)
{
a++;
System.Web.HttpContext.Current.Response.Write(a);
return;
}