I have a this JavaScript function:
function notificationDivPressed(element,userId,numberOfUsers) {
$.ajax({
url: '/Notification/ChangeReadStatus',
type: "POST", cache: false,
data: { arg: userId },
success: function (data) {
//some code
}
});
and this is ChangeReadStatus() function from Controller:
[HttpPost]
public void ChangeReadStatus(string id)
{
//some code
}
why 'id' value in ChangeReadStatus is equal to 'null'?
datatype: jsonneeded