我在listvew中有这个表
<asp:ListView ID="listid" runat="server" GroupPlaceholderID="groupPlaceHolder1"
ItemPlaceholderID="itemPlaceHolder1" OnPagePropertiesChanging="OnPagePropertiesChanging">
<LayoutTemplate>
<table id="tblid" class="datatable">
<thead>
<tr>
header column
</tr>
</thead>
<tbody>
<asp:PlaceHolder runat="server" ID="groupPlaceHolder1"></asp:PlaceHolder>
</tbody>
</table>
</LayoutTemplate>
<GroupTemplate>
<tr class="trowcount">
<asp:PlaceHolder runat="server" ID="itemPlaceHolder1"></asp:PlaceHolder>
</tr>
</GroupTemplate>
<ItemTemplate>
table columns list
</ItemTemplate>
</asp:ListView>
这个表的查询需要一段时间,所以我想把简单的加载gif 放在这里
<ItemTemplate>
table columns list
</ItemTemplate>
直到查询完成。
后端就像:
Using cmd As New SqlCommand()
cmd.CommandText = "my query"
cmd.Connection = con
Using sda As New SqlDataAdapter(cmd)
Dim dt As New DataTable()
sda.Fill(dt)
lvExport.DataSource = dt
lvExport.DataBind()
End Using
End Using