Naresh Bada

Naresh Bada

  • NA
  • 212
  • 19.1k

edit data not showing i using jquery function with mvc

Mar 3 2020 12:42 AM
function EditData(reg_Id) {
$('#myModal').modal('toggle');
//var reg_name =$(this).closest("tr").find("td").eq(0).html();
$.ajax({
type: "POST",
url: "/Home/EditData",
data: "{ 'Id': '" + reg_Id + "','type': '2'}",
contentType: "application/json; charset=utf-8",
success: function (result) {
console.log(result);
//edit_window.dialog("open");
// $("input[name='reg_id']").val(id);
$("myModal").attr("ActionResult", "/Home/EditData" + Id)
$("input[name='reg_name']").val(response.reg_Id);
$("input[name='reg_email']").val(response.reg_Id);
$("input[name='reg_mob']").val(response.reg_Id);
$("input[name='dep_name']").val(response.dep_Id);
},
error: function (response) {
alert(response.responseText);
},
failure: function (response) {
alert(response.responseText);
}
})
}