查询显示进度条
1、代码如下:
1 <asp:UpdatePanel ID="up001" runat="server">
2 <ContentTemplate>
3 <table>
4 <tr>
5 <td>
6 <asp:Button ID="btnOK" runat="server" Text="查询" OnClick="btnOK_Click" OnClientClick="document.getElementById('dialogBox').style.display='block';" />
7 </td>
8 <td>
9 <asp:UpdateProgress ID="prog" runat="server">
10 <ProgressTemplate>
11 </div>
12 <div id="dialogBox" style="display: none;">
13 <div style="z-index: 999; width: 300px; position: absolute; left: 300px; top: 80px;
14 background: #FFFFFF; padding: 5px; border: 3px solid #999999;" id="dialogBoxBG">
15 <div style="cursor: pointer; float: right; background: #666666; color: #ffffff; padding: 2px;"
16 onclick="document.getElementById('dialogBox').style.display='none';">
17 Close</div>
18 <div>
19 <img src="http://www.cnblogs.com/../App_Themes/image/blue/loading.gif" />
20 请稍候,正在查询中
21 </div>
22 </div>
23 <div id="dialogBack" style="background: #000000 none repeat scroll 0% 0%; z-index: 998;
24 position: absolute; top: 0px; left: 0px; filter: alpha(opacity=20); opacity: 0.2;
25 width: 100%; height: 100%;">
26 </div>
27 </div>
28 </ProgressTemplate>
29 </asp:UpdateProgress>
30 </td>
31 <td>
32 <asp:Label ID="lblTime" runat="server"></asp:Label>
33 </td>
34 </tr>
35 </table>
36 <asp:GridView ID="gvShow" runat="server">
37 </asp:GridView>
38 </ContentTemplate>
39 </asp:UpdatePanel>
2、运行效果,如下: