I have two form tags on a page to validate some fields that appear in modal, the first form
, is just to search in grid
. The% open% modal, and the remove filter function work perfectly.
However, when opening the modal, the button
that sends the data does not work, it just closes the modal. And if I put it (the button) inside the buton
tag, it (the form
) gives error as if it had not filled in.
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="row">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<div id="contact-form" class="panel panel-default">
<div style="text-align: center;" class="panel-heading">
<p class="panel-title">
<asp:Label ID="Label78" runat="server" Font-Size="Large" Text="Agendar Avaliação Física"></asp:Label>
</p>
</div>
<form id="form">
<div class="row">
<div class="modal-body">
<div class="col-md-2">
<asp:Label ID="Label18" runat="server" Text="Hora"></asp:Label>
</div>
<div class="col-md-3">
<div class="input-group">
<asp:TextBox ID="txtHora" runat="server" class="form-control" required="required" onblur="Verifica_Hora(this);"></asp:TextBox>
<span class="input-group-addon danger"><span class="glyphicon glyphicon-asterisk"></span></span>
</div>
</div>
<div class="col-md-1">
<asp:Label ID="Label250" runat="server" Text="Data"></asp:Label>
</div>
<div class="col-md-4">
<div class="input-group">
<asp:TextBox ID="txtData" runat="server" class="form-control" onblur="limparDataInvalida(this);" required="required"></asp:TextBox>
<span class="input-group-addon danger"><span class="glyphicon glyphicon-asterisk"></span></span>
</div>
</div>
<div class="col-md-2">
<asp:Label ID="Label19" runat="server" Text="Observação"></asp:Label>
</div>
<div class="col-md-9">
<textarea id="txtObeservacao" cols="20" rows="2" runat="server" class="form-control" style="resize: none"></textarea>
</div>
</div>
</div>
</form>
<div class="modal-footer">
<asp:Button ID="btnGravar" runat="server" CssClass="btn btn-success btn-block" Text="Gravar" OnClick="btnGravar_Click" />
</div>
</div>
</div>
</div>
<br />
</div>
</div>
</div>
It should save, in the code I save the data in the bank or change, how can I make it work?