2014-01-08 43 views
1

我正在使用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

試試這個:

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

    // ... 
} 
相關問題