<style>
.divWaiting {
position: fixed;
background-color: #FAFAFA;
z-index: 2147483647 !important;
opacity: 0.8;
overflow: hidden;
text-align: center;
top: 0;
left: 0;
height: 100%;
width: 100%;
padding-top: 20%;
}
</style>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:UpdatePanel runat="server" ID="upPopUps" UpdateMode="Always">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AutoGenerateEditButton="True" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" DataKeyNames="ID,MainID" OnRowDataBound="GridView1_RowDataBound" CssClass="table table-hover table-bordered table-responsive" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="20" FirstPageText="First" PreviousPageText="Previous" NextPageText="Next" LastPageText="Last" AllowSorting="True" OnRowDeleting="GridView1_RowDeleting" OnInit="GridView1_Init" OnRowCommand="GridView1_RowCommand" OnSelectedIndexChanged="OnSelectedIndexChanged">
----------------
</asp:GridView>
<asp:Panel runat="server" ID="pnlAddEdit" CssClass="modal-fade" Style="height: 80vh; overflow-y: auto;" BorderStyle="Double" Font-Size="Small">
</asp:Panel>
<asp:LinkButton ID="lnkFake" Text="" runat="server"></asp:LinkButton>
<ajaxToolkit:ModalPopupExtender ID="popup" BehaviorID="popup" runat="server" DropShadow="false"
PopupControlID="pnlAddEdit" TargetControlID="lnkFake" BackgroundCssClass="modalBackground" CancelControlID="btnPnlClose">
</ajaxToolkit:ModalPopupExtender>
</ContentTemplate>
<Triggers>
<%--<asp:PostBackTrigger ControlID="GridView1" />
<asp:PostBackTrigger ControlID="btnPnlDelete" />
<asp:PostBackTrigger ControlID="btnPnlUpdate" />--%>
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="updprogress" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="upPopUps">
<ProgressTemplate>
<div class="divWaiting">
<asp:Label ID="lblWait" runat="server" Text=" Please wait... " />
<asp:Image ID="imgWait" runat="server" ImageUrl="~/Content/images/refresh.gif" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>
-----------------
Note: Also where you want no autopostback in page, than you have to add that controls inside update panel. Also we can comment the triggers. It will work as asyncpost.
reference:- https://stackoverflow.com/questions/12191436/how-i-can-use-the-updateprogress-control-to-show-a-wait-symbol
No comments:
Post a Comment