c# - Display Modal Popup On Button Click -
i want show modal popup after click save button save values in db , while showing modal popup, should continue saving, without closing modal popup using code
protected void btsave_click(object sender, eventargs e) { modalpopupextender1.show(); //my code }
and aspx code
<input type="button" runat="server" id="btmodel" style="display: none" /> <ajaxtoolkit:modalpopupextender id="modalpopupextender1" runat="server" targetcontrolid="btmodel" popupcontrolid="panel1" popupdraghandlecontrolid="popupheader" drag="true" dropshadow="true" okcontrolid="okbutton" cancelcontrolid="cancelbutton" backgroundcssclass="modalpopupbg"> </ajaxtoolkit:modalpopupextender> <asp:panel id="panel1" style="display: none" runat="server"> <div class="progress-popup"> <div class="potit"> saving </div> <img src="/images/prog.png" alt="" style="margin: 0 auto; display: block;" /> <div class="potit-cancel"> <span class="cncl"> <asp:button id="btnokay" runat="server" text="ok" onclick="btnokay_click" validationgroup="vg" cssclass="popupcancl" /> </span> </div> </div> </asp:panel>
with code, first saving data in db, showing modalpopup
add hidden field on page. assign value (let say, 'showed') when press button , then, in page_load, string.compare, see if value of hidden field 'showed'. if is, show again modal control. when press cancel button, delete value hidden field (make string.empty).
Comments
Post a Comment