You should add ServiceCallBTN_Click
method in onClick
event for the button in your markup.
Button Click function from modal on code behind
-
06-07-2023 - |
Question
i have this modal :
<div class="modal fade" id="ModalServiceCalls" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" dir="rtl" id="CloseBTN">
×</button>
<h4 class="modal-title">
service call</h4>
</div>
<div class="modal-body">
</div>
<br />
<asp:Button ID="ServiceCallBTN" runat="server" Text="סגור קריאה" CssClass="btn btn-default"
Font-Bold="true" />
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
close</button>
<button type="button" class="btn btn-primary">
save changes</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
I want to create a function in code behind that will start with this button click. This is the code behind function:
protected void ServiceCallBTN_Click(object sender, EventArgs e)
{
Response.Write("checking");
}
The problem is that this function is not even fired.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow