I created a view in MVC 5 with table like this:
@foreach (var item in Model)
{
<tr>
<td>
<h3 class="label label-primary">@item.FRM_CODE</h3>
</td>
<td>
@Html.DisplayFor(model => item.FRM_NAME)
</td>
<td>
@Html.DisplayFor(model => item.FRM_DES)
</td>
<td>
<input type="date" class="form-control" id="dateNgayPsinhDlieu" />
</td>
<td>
<input type="button" id="btnCreatReport" class="btn btn-primary" value="@item.FRM_NAME" />
</td>
</tr>
}
<script>
$('#btnCreatReport').bind("click", function () {
var controller = $('#btnCreatReport').attr('value');
homeController.printData(controller);
alert(controller);
});
</script>
I just call function success the first button and the buttons next is not response the ajax function. Help me
</div>