javascript - Web forms keep bootstrap modal open and on next page after postback? -
good morning all, can't life of me find working answer this. i'm looking question states.
just little background, i'm working on application have "setup" process after first registering , logging in first time. i'm doing via modal bootstrap. there multiple steps user submitting data through asp button in order update database.
these steps i'm stuck after postback page reloads , modal reopens @ beginning of getting started.
to explain how i'm paging, i'm using new div each page display: none until part of setup. here of code...
<div id="mymodal" class="modal fade" role="dialog"> <div class="modal-dialog"> <div class="modal-body"> <div class="modalpageone"> ... content <asp:button id="btnone" runat="server" onclick="btnone_click" onclientclick="nextpage();" text="submit"> </div> <div class="modalpagetwo"> ... content <asp:button id="btntwo" runat="server" onclick="btntwo_click" onclientclick="nextpage();" text="submit"> </div> <div class="modalpagethree"> ... content <asp:button id="btnthree" runat="server" onclick="btnthree_click" onclientclick="nextpage();" text="submit"> </div> </div> </div> </div>
here of javascript
<script> var currentpage = 1; function nextpage() { if(currentpage == 1) { $(".modalpageone").hide(); $(".modalpagetwo").show(); currentpage++; } else if ... finish else if pages } </script>
that should enough show how i'm doing setup process. when asp button clicked need go next page. if has ideas, amazing!
thanks, andy
instead of having different modal each form, wrap asp:multiview in single modal div , modify selected view on submit. open same modal different content.
Comments
Post a Comment