如何向客户显示进度流程

时间:2014-01-08 08:52:43

标签: c#

我正在使用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个按钮。

我想要的只是点击一下按钮。

1 个答案:

答案 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();

    // ...
}