AJAX UpdateProgressBar

 

[转载]AJAX UpdateProgressBar

AJAX UpdateProgressBar

文章作者:Munir Shaikh
信息来源:邪恶八进制信息安全团队( www.eviloctal.com

Why we need progressbars in any application?

We need progress bar to represent the status, current activity is being performed. It helps us to design more intuitive UI when web page contains one or more update panel controls for partial page rendering.

If a partial page update is slow you can use update progress control to provide visual feedback about the status of the update.

You can put multiple update progress controls on a page each associated with the different update panel control. To provide the visual feedback about the status of the object, here is simple code, which shows you that on button click Ajax updateprogress appear which displays rotating image, and at the backend process of connecting to the database and binding to the gridview appears.

I have simple table as below

Tbl_Projects:

ProjectId int,

ProjectName varchar(50),

Duration int,

Status char(1)

I have a static method in the sealed class as below:

public sealed class Util

{

  public static DataSet ExecuteDataSet()

  {

    DataSet dtst = new DataSet();

    SqlConnection SqlCon = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);

    SqlCommand SqlComd = new SqlCommand("SELECT * FROM Tbl_Projects", SqlCon);

    SqlDataAdapter SqlAdpt = new SqlDataAdapter();

    try

    {      

      SqlAdpt.SelectCommand = SqlComd;

      SqlAdpt.Fill(dtst);      

    }

    catch

    { }

    finally

    {

      SqlCon.Close();

    }

    return dtst;

  }

}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值