ASP.NET button inside bootstrap modal not triggering click event
I'd like to add another point here. I faced this issue because my final rendered modal dialogs were placed outside the WebForms <form>
tag, and using the UseSumbitBehavior="false"
did not solve my problem. Moving the modal dialog divs inside the form solved the issue.
$("div.modalForm").appendTo($("form:first"));
You can use the ASP Button like in your example
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-large"> Close</button>
<asp:Button runat="server" ID="btnSaveImage" Text="Save Image" CssClass="Greengradiant btn- large" OnClick="btnSaveImage_Click" />
</div>
just try the UseSubmitBehavior="false" like said skhurams and combine it with the data-dismiss="modal"
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-large"> Close</button>
<asp:Button runat="server" ID="btnSaveImage" Text="Save Image" CssClass="Greengradiant btn- large" OnClick="btnSaveImage_Click" UseSubmitBehavior="false" data-dismiss="modal" />
</div>
this will close the modal and trigger the postback