i have a hidden for control as
@Html.HiddenFor(m => m.SchedulingProfileDetails.Id)
I am trying to access the value in this hidden field in my jquery and then trying to pass the value to controller
var id = $("#SchedulingProfile_Id").val();
$.ajax({
url: rootUrl + 'SchedulingProfile/SaveDetails',
type: "POST",
data: ({
schedulingProfileId: schedulingProfileId,
});
but I am getting null value in id. Please help me out
I could be wrong, but isn't it merely that:
var id = $("#SchedulingProfile_Id").val();
needs to be:
var id = $("#SchedulingProfileDetails_Id").val();
?