I have a form and 2 submit buttons. The Yes
button will display #modal1
and the No
button will display #modal2
. The form need to submit to controller. I refer this question in order to solve this. I am using this answer. It
display the modal but the form are not submit
<input type="button" value="Create" onclick="location.href='@Url.Action("Create", "User")#modal1'" />
But the example shows only for type="button"
. Is there anyway I could do this using submit button?
<form Class="form-horizontal" role="form" method="get" id="myform">
<input name="eventDate" id="eventDate" Class="form-control">
<button type="submit" id="btnSearch1" value="search" class="btn btn-success">Yes</button>
<button type="submit" id="btnSearch2" value="search" class="btn btn-success">No</button>
</form>