How To Display A Loading Image When Gridview Data Loading Is In Progress

10 Jun


<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Loading.aspx.cs” Inherits=”Loading” %>

<html xmlns=””&gt;

<head runat=”server”>


<link href=”style/ModelExtender.css” rel=”stylesheet” type=”text/css” />


<body  >

<form id=”form1″ runat=”server”>

<asp:ScriptManager ID=”ScriptManager1″ runat=”server”>


<div style=”margin-left:255px;margin-top:76px”>

<asp:UpdateProgress ID=”UpdateProgress2″ runat=”server” AssociatedUpdatePanelID=”UpdatePanel2″>


<div id=”progressBackgroundFilter”></div>

<div id=”processMessage”></div>



<asp:UpdatePanel ID=”UpdatePanel2″ runat=”server” UpdateMode=”Conditional”>


<br />

<asp:Button ID=”btnLoad” runat=”server”

Text=”Load Grid” onclick=”btnLoad_Click” ForeColor=”Red” />

<br />  <br />

<asp:GridView ID=”GridView1″ runat=”server” CellPadding=”4″ ForeColor=”#333333″

GridLines=”None” AutoGenerateColumns=”false” AllowPaging=”True”


<AlternatingRowStyle BackColor=”White” />


<asp:BoundField DataField=”DocumentID” HeaderText=”DocumentID ” />

<asp:BoundField DataField=”Title” HeaderText=”Title  ” />

<asp:BoundField DataField=”displayTitle” HeaderText=”displayTitle ” />

<asp:BoundField DataField=”friendlyUrl” HeaderText=”friendlyUrl ” />


<EditRowStyle BackColor=”#2461BF” />

<FooterStyle BackColor=”#507CD1″ Font-Bold=”True” ForeColor=”White” />

<HeaderStyle BackColor=”#507CD1″ Font-Bold=”True” ForeColor=”White” />

<PagerStyle BackColor=”#2461BF” ForeColor=”White” HorizontalAlign=”Center” />

<RowStyle BackColor=”#EFF3FB” />

<SelectedRowStyle BackColor=”#D1DDF1″ Font-Bold=”True” ForeColor=”#333333″ />

<SortedAscendingCellStyle BackColor=”#F5F7FB” />

<SortedAscendingHeaderStyle BackColor=”#6D95E1″ />

<SortedDescendingCellStyle BackColor=”#E9EBEF” />

<SortedDescendingHeaderStyle BackColor=”#4870BE” />









using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

public partial class Loading : System.Web.UI.Page


protected void Page_Load(object sender, EventArgs e)


if (!IsPostBack)





public static DataSet Events_getAll(string qry)


sqlhelper data_manager = new sqlhelper();

Hashtable ht_params = null;

DataSet dt = null;



ht_params = new Hashtable();

dt = data_manager.SQLDataSet(qry);

return dt;


catch (Exception ex)


throw ex;




ht_params = null;

data_manager = null;



private void BindGridViewView()


string qry = “select * from documents where  siteid=76”;

GridView1.DataSource = Events_getAll(qry);



protected void btnLoad_Click(object sender, EventArgs e)





1 Comment

Posted by on June 10, 2011 in Vb.Net


Tags: , , , , ,

One response to “How To Display A Loading Image When Gridview Data Loading Is In Progress

  1. Christhu

    July 24, 2014 at 12:45 pm

    Good. But how people can use your coding. where is css coding?


Leave a Reply to Christhu Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: