I have a bootstrap modal which contains a textbox and a numeric keypad inside, so when you click on a button you must "write" the number of the button in the textbox. The problem is that when you click any button (from the modal keyboard), the modal closes. The number if it remains written but to see it I must open the modal again. Is there any way to make the modal not close?.
I read that it can be solved by placing an updatepanel inside the body of the modal to avoid autopostback .. but I have no idea how.
<!--VENTANA MODAL -->
<div class="modal fade" id="recep" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header" style="align-content:center">
<h2 class="modal-title" id="exampleModalLabel">TITULO MODAL</h2>
</div>
<div class="form-group" >
<div class="modal-body" style="align-content:center;">
<h2 style="text-align: justify">Ingrese un numero:</h2>
<!--teclado numerico -->
<asp:Button ID="b0" runat="server" Text="0" OnClick="b0_Click"/>
<asp:Button ID="b1" runat="server" Text="1" OnClick="b1_Click"/>
<asp:... etc...
<!--textbox -->
<asp:textbox id="sem" runat="server" autocomplete="off"></asp:textbox>
</div>
</div>
<!--cerrar -->
<div class="modal-footer" style="align-content:center">
<asp:Button id="cr" runat="server" data-dismiss="modal" text="CANCELAR" />
<!--guardar-->
<asp:Button id="RR" runat="server" text="ACEPTAR" OnClick="RR_Click"/>
</div>
</div>
</div>
</div>
<!--VENTANA MODAL -->
webform aspx.cs
protected void b0_Click(object sender, EventArgs e)
{
sem.Text = sem.Text + "0";
}