如何在按钮回发后自动禁用页面并在回发后再次启用它? [英] how to disable page automatically after button post back and enable it again after post back ?
本文介绍了如何在按钮回发后自动禁用页面并在回发后再次启用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望在用户单击按钮时禁用所有页面的控件,但我想在所有应用程序中自动执行此操作,这意味着一旦发回,页面被驱散并且在回发结束后也会自动启用?
i want to disable all page's controls when user click button but i want to do this automatically in all application i means as soon as the post back occur , the page dispelled and also enabled automatically after post back end ?
推荐答案
你可以使用更新进度并使用一个大尺寸的图像,以便覆盖整个页面,png图像应该是半透明的,当回发结束页面时回复时N感觉被禁用自动启用
you can use Update progress and use a big size image so that cover whole page, png image should be semi transparent to look N feel disabled at the time of postback when postback ends page automatically enable
我在html中使用了这个男女同校:
i used this coed in html :
<td width="50%" align="right">
<asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="30" AssociatedUpdatePanelID="p1">
<ProgressTemplate>
<div runat="server" id="div1" class="updateprogress">
<table id="Table1" runat="server" style="height: 100%; width: 100%">
<tr>
<td align="center">
<img alt="" src="../Images/icon-loading.gif" />
<%--<asp:label Text="please wait" Font-Bold="true" ForeColor="Red" Font-Size="Medium" runat="server" ID="lbl"> </asp:label>--%>
</td>
</tr>
</table>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel runat="server" ID="p1">
<ContentTemplate>
<asp:Button runat="server" CssClass="Button" Text="show " ID="btn_show_inbox"
OnClick="btn_show_inbox_Click" Width="200px" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
class updateprogress in css
.updateprogress
{
height:9000px;
width:100%;
left:0%;
top:0%;
position:fixed;
background-color:Gray;
filter:alpha(opacity=50);
}
这篇关于如何在按钮回发后自动禁用页面并在回发后再次启用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文