var data = {};
data.Name = name;
data.Value = val;
data.UserId = userId;
jQuery.ajax({
url: '@Url.Action("SubmitPresent")',
type: "POST",
dataType: "json",
contentType: "application/json;charset=utf-8",
data: JSON.stringify(data),
success: function (d) {
alert(d);
location.reload();
},
error: function (d) { alert(d) }
});
data.Name = name;
data.Value = val;
data.UserId = userId;
jQuery.ajax({
url: '@Url.Action("SubmitPresent")',
type: "POST",
dataType: "json",
contentType: "application/json;charset=utf-8",
data: JSON.stringify(data),
success: function (d) {
alert(d);
location.reload();
},
error: function (d) { alert(d) }
});