<div> <table id="tblEnquire" class="table table-hover table-bordered table-striped table-responsive"> <thead> <tr> <th></th> <th>Student Name</th> <th>Course</th> <th>Qualification</th> <th>Contact</th> <th>Email</th> <th>Address</th> <th>Remarks</th> </tr> </thead> <tbody> @foreach(StudentsEnquire enqire in Model.StudentEnquire) { <tr> <td>@Html.CheckBox("status"+enqire.StudentId, new { value = enqire.StudentId, @class = "EnquireCheckBox" })</td> <td>@(enqire.SName)</td> <td>@(enqire.SCourse)</td> <td>@(enqire.SQualification)</td> <td>@(enqire.SContact)</td> <td>@(enqire.email)</td> <td>@(enqire.SAddress)</td> <td>@(enqire.Remarks)</td> </tr> @Html.Hidden("studentid",enqire.StudentId) } </tbody> </table> <button type="button" class="btn btn-primary btn-xs" id="btnAddNewStudent" data-dissmiss="modal">Add New Student</button> <button type="button" class="btn btn-primary btn-xs" id="btnEditStudent" data-dissmiss="modal">Edit Student</button> <button type="button" class="btn btn-primary btn-xs" id="btnDeleteStudent" data-dissmiss="modal">Delete Student</button> </div>
$('#btnEditStudent').click(function () { if ($('EnquireCheckBox').checked == true) { var value = $(this).val(); data: $(this).val(); $.ajax({ url: "/Students/UpdateStudent?StudentId="+data, success: function (data) { $('#testbody').html(data); $('#myModal').modal('show'); } }); } else if ($(this).prop("checked") == false) { } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)