您可以提供的解决方案是您可以在回帖开始后使用加载 gif 图像,您将以下代码放在母版页中
<asp:ScriptManager EnablePartialRendering="true" ID="ScriptManagerMain" runat="server"
AsyncPostBackTimeout="360000">
</asp:ScriptManager>
在母版页中的内容占位符之前,放置以下更新进度
<script type="text/javascript" language="javascript">
var ModalProgress = '<%= ModalProgress.ClientID %>';
</script>
<script type="text/javascript" src="Scripts/js/jsUpdateProgress.js">
</script>
<asp:Panel ID="panelUpdateProgress" runat="server" CssClass="updateProgress">
<asp:UpdateProgress ID="UpdateProg1" DisplayAfter="0" runat="server">
<ProgressTemplate>
<div class="divWaiting">
<img id="progressImg" src="img/App/Rolling.gif" alt="Processing" height="60px" width="60px" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Panel>
<cc1:ModalPopupExtender ID="ModalProgress" runat="server" TargetControlID="panelUpdateProgress"
BackgroundCssClass="modalBackground" PopupControlID="panelUpdateProgress" />
Progress Div 中使用的 CSS 如下
.divWaiting
{
position: fixed;
background-color: #313130;
z-index: 2147483647 !important;
opacity: 0.8;
overflow: hidden;
text-align: center;
top: 0;
left: 0;
height: 100%;
width: 100%;
padding-top: 30%;
}
jsUpdateProgress.js 代码如下,
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);
function beginReq(sender, args) {
// shows the Popup
$find(ModalProgress).show();
}
function endReq(sender, args) {
// hides the Popup
$find(ModalProgress).hide();
}
试试这个,它会在回发开始后打开加载 GIF,并在回发结束时结束。这将防止双击