Chevy Mark Sunderland

Chevy Mark Sunderland

  • NA
  • 188
  • 166.8k

[C# net 4] Load page please wait (not updating but page load

May 4 2013 5:36 PM
[C# net 4] Load page please wait (not updating but page load)

Hi all, hope in your help and suggestions.

I need show the classic message 'Please wait' when my gridview is populated in my page aspx.

In the google search I find all examples and tutorials with buttons that update the page aspx, e.g.:
http://aspsnippets.com/Articles/Display-loading-progress-image-when-Page-Loads-or-does-PostBack-using-ASPNet.aspx

In this demo when call gridview.aspx the message not show, instead is show when click in the button 'btnSubmit'.

Can you help me?

I tried this version but the images spinner4-greenie.gif not showed:

<body>
<form id="form1" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="DecoderView" runat="server" AllowPaging="True" AllowSorting="true"
AutoGenerateColumns="False" PageSize="13" ShowHeader="true" OnPageIndexChanging="GridView1_PageIndexChanging"
OnRowDataBound="GridView1_RowDataBound" CssClass="mGrid" ShowHeaderWhenEmpty="true"
EmptyDataText="No data available." DataKeyNames="ID" OnRowEditing="GridView1_RowEditing"
OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowCommand="GridView1_RowCommand"
OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting">
<Columns>
...
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<div class="loading" align="center">
<img src="images/spinner4-greenie.gif" alt="" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</form>
</body>