3
Answers

Server side button click event is not working from bootstrap

Hi ,

I am trying to call server side click event from my bootstrap popup . I wanted to save data . But I am unable to fire click event on button click . I checked online and they says keep your text box and buton inside form tag. I also tried that as well but not working ..
 
I have master page , on which form element is present and updatepanel. 
 
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel">Create State</h4>
</div>
<form>
<div class="modal-body">
<div class="form-group">
<label for="recipient-name" class="control-label">State</label>
<asp:TextBox class="form-control" ID="txtState" runat="server"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<asp:Button UseSubmitBehavior="false" ID="btnSave" runat="server" Text="Save" class="btn btn-primary tp" OnClick="btnSave_Click" />
</div>
</form>
</div>
</div>
</div>
 
Hide Copy Code

Answers (3)