代码:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Threading;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void demo() {
for (int i = 1; i <=10; i++)
{
TextBox1.Text = Convert.ToString(i);
Thread.Sleep(1000);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Thread th = new Thread(new ThreadStart(demo));
th.Start();
}
}