[ad_1]
Saya merancang kotak popup modal bootstrap yang akan terbuka setelah mengklik tombol di halaman induk. Saya ingin melakukan beberapa hal dalam modal dan menutupnya tetapi halaman induk disegarkan setelah saya mengklik tombol pada halaman anak dan formulir modal dikirimkan. Saya mencoba **OnClientClick=”return false;”** tetapi berhenti mengaktifkan button event .
Adakah yang bisa memberi tahu saya cara mengatasinya
**KODE**
**Halaman Induk**
HTML
<a href=\"/abcd/abcd1/abcd2.aspx?abcd3=" + Eval("abcd4") + "&abcd5=" + Eval("abcd6") + "&abcd7=" + Eval("abcd7") + "&abcd8=" + Eval("abcd8") + "\" class='li-modal'>"+ Eval("abcd9") + "</a>
**HALAMAN ANAK**
ASP.NET
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" > <title>ABCDEF</title> <script language="javascript" type="text/javascript" src="/abcdef/xyzed/Script.js"></script> </head> <body scroll="no"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">X</button> </div> <div class="modal-body" style="margin-left:-140px;"> <div class="panel panel-default"> <div class="panel-body"> <form id="form1" runat="server"> <table class="inputForm" cellspacing="0" cellpadding="0" border="0" style="width: 100%; height: 100%; table-layout: fixed"> <thead> <tr height="18"> <td>ABCDEF Order</td> </tr> </thead> <tfoot> <tr> <td style="vertical-align: middle"> <table> <tfoot> <tr> <td>XYZED no:</td> <td> <asp:TextBox ID="No" runat="server" Width="50px" EnableViewState="False" /> </td> <td> <asp:Button ID="xyz1" runat="server" Text="|<" OnClick="xyz1_Click" autopostback="false"/> <asp:Button ID="xyz2" runat="server" Text="<" OnClick="xyz2_Click" OnClientClick="return false;" /> <asp:Button ID="xyz3" runat="server" Text=">" OnClick="xyz3_Click" OnClientClick="return false;" /> <asp:Button ID="xyz4" runat="server" Text=">|" OnClick="xyz4_Click" OnClientClick="return false;" /> </td> </tr> </tfoot> </table> </td> </tr> <tr class="footerrow" height="24"> <td align="right"> <asp:Button ID="btnSubmit" CssClass="button" runat="server" Text="Ok" OnClick="btnSubmit_Click"> </asp:Button><input class="button" id="btnCancel" onclick=" top.window.close();" type="button" value="Cancel" name="btnCancel" /></td> </tr> </tfoot> </table> </form> </div> </div> <div class="modal-footer"> </div> </div> </body> </html> </asp:Content>
**Halaman Anak.cs**
C#
protected void Page_Load(object sender, EventArgs e) { No = long.Parse(Request.QueryString["No"]); RuleNo = long.Parse(Request.QueryString["RuleNo"]); if (!IsPostBack) { No.Text = ((long)oldRuleNo).ToString(); } } protected void xyz1_Click(object sender, EventArgs e) { No.Text = "1"; }
Setelah mengklik xyz1_Klik tombol halaman induk menyegarkan. Bagaimana cara menghentikannya. Tolong bantu