Lemme 给你详细解释...
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</ContentTemplate>
并根据需要添加更新进度
<asp:UpdateProgress ID="UpProDisp" runat="Server" AssociatedUpdatePanelID="UpdatePanel1" OnLoad="UpdatePanelProdDisp_Load">
<ProgressTemplate>
</ProgressTemplate>
</asp:UpdateProgress>
还添加模态弹出窗口
<asp:ModalPopupExtender ID="modalExtender" runat="server" TargetControlID="UpProDisp" PopupControlID="Panel1" DropShadow="true" BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" CssClass="modalExtender">
<img alt="Processing" src="../Images/Processing.jpg" />
<br />
<asp:Label ID="lblProcessing" runat="server" Text="Processing..." CssClass="TitleBar"></asp:Label>
</asp:Panel>
使用以下 javascript 代码...
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(showPopup);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(hidePopup);
function showPopup(sender, args) {
var ModalControl = '<%= modalExtender.ClientID %>';
$find(ModalControl).show();
}
function hidePopup(sender, args) {
var ModalControl = '<%= modalExtender.ClientID %>';
$find(ModalControl).hide();
}
</script>
告诉我它是否有效。