日期:2011-07-06  浏览次数:20430 次

这里的一个应用是UpdateProgress的应用完善。为了给用户显示的效果更好而设计。你可以参看效果:

http://szhxy.gliet.edu.cn/qxgl/登录显示的更新过程。

代码如下:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<style type="text/css">
#UpdatePanel1 ...{
  width: 300px;
  height: 100px;
  border:solid 1px gray;
}   
</style>
    <title>更新测试</title>
</head>
<body>

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="True" EnableScriptGlobalization="True" >

        </asp:ScriptManager>
        <div visible="false">
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0">
                <ProgressTemplate>
                                   
                <div id="Progress" style="border: 1px solid rgb(73, 138, 194); padding: 0px; z-index: 1000;  margin-top: 20%; margin-left: 30%; width: 229px; position: absolute; height: 94px; background-color: rgb(255, 255, 255); border-collapse: collapse; left: 206px; top: 129px;">
                   
            <table cellpadding="4" cellspacing="0" style="width: 100%; height: 100%;">
            <tr>
                <td style=" height:26px; text-align: left; background-image: url(tile_back.gif); text-align: left;">
                <span style="font-size: 9pt;color: #ffffff"> <strong>系统提示</strong></span></td>
            </tr>
            <tr>
                <td  valign="middle" style="height:100%;text-align: center; vertical-align: middle;">
                <br />
                <br />
                <img alt="Waiting..." src="http://www.pushad.com/Info/indicator_mozilla_blu.gif" style="vertical-align: middle;border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" />
                <span style="font-size: 9pt">正在处理,请稍后……</span></td>
            </tr>