I am building this edit function that will use the index value to will pass to a modal that can then dislay the record for users to edit. I have the index value being logged but I am not sure how to pass it to the modal window. Both pages are cshtml and I never did most on the front end. Any help would be great.
$(".references-list").on("click", ".edit-reference", function () {
var index = $(this).data('index');
console.log(index);
getAjax("@Url.Action("Add", "References")", function (data, index)
{
$("#reference-modal .modal-body").html(data);
$("#reference-modal").modal('show');
});
return false;
});
Controller
[HttpGet]
public ActionResult Add()
{
return PartialView();
}