我正在使用C#4.0,我希望在点击按钮后显示进度。
protected void ASPxButton_cloture_Click(object sender, EventArgs e)
{
tell user that procedure 1 begin
do procedure 1.....
tell user that procedure 1 finish
tell user that procedure 2 begin
do procedure 2.....
tell user that procedure 2 finish
etc...
}
我尝试过更新面板,但每个按钮只能运行一个。这意味着当我有5个程序时,我必须有5个按钮。
我想要的只是点击一下按钮。
答案 0 :(得分:1)
试试这个:
protected void ASPxButton_cloture_Click(object sender, EventArgs e)
{
Response.Write("procedure 1 begin");
Response.Flush();
// do procedure 1.....
Response.Write("procedure 1 finish");
Response.Flush();
Response.Write("procedure 2 begin");
Response.Flush();
// do procedure 2.....
Response.Write("procedure 2 finish");
Response.Flush();
// ...
}