I'm populating a large amount of data into an Asp.net
repeater control. I need to implement a "loading" message until the data loads. I'm trying an Updatepanel/Updateprogress
combo, but so far, the UpdateProgress
text doesn't display.
Here's my code. The Repeater
control builds and loads a jquery datatable:
<div style="clear:both;padding-top:15px;">
<asp:UpdateProgress ID="UpdateProgress1" runat="Server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate >
Please wait ...
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Repeater runat="server" ID="rptGrid">
<HeaderTemplate>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="Grid">
<thead>
<tr>
<th>Name</th>
<th>Location</th>
</tr>
</thead>
</HeaderTemplate>
<ItemTemplate>
<tr class='nondraft'>
<td><%# Eval("EmployeeName") %></td>
<td><%# Eval("Location")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</ContentTemplate>
</asp:UpdatePanel>
</div>
Any idea what I'm doing wrong? Thanks
This is because you have not added asynchronous post back to your code. You can add that code after
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="IdName" EventName="YourEventName" />
</Triggers>
</asp:UpdatePanel>
You need to write control id ie your control on which you need to show your update progress Like Button.