1

I want to show loading picture when I'll click the button. And after finish my some calculation, make this picture is invisible. How to do it without AJAX and not using [WebMethod]? I know some tricks how to do it with AJAX or PageLoad, but I'm interesting, how to do it in the different threads, is it possible?

For example my code:

protected void btnDelete_Click(object sender, EventArgs e)
    {       
            imgLoading.Visible = true;
            lblCount.Visible = false;

            //doing some work
            bool isDone = TProfile.Delete(userId, someData);

            if (isDone)
            {
                imgLoading.Visible = false;
                lblCount.Visible = true;
            }

        BindList(true);
    }
4

1 回答 1

3

您可以使用OnClientClick加载图像,当页面完成循环到您的服务器并重新加载页面时,它将消失。

于 2012-10-17T13:38:18.513 回答