I am trying to pass data to my controller action Method by using JQuery .$Post method. I have tried multiple ways to pass data but wasn't able to receive any data from the ajax $.post()
method.
Here is my script
$.post("/Home/ListChild/", {"259"}, function (data, status) {
for (var i = 0; i < data.length; i++) {
remoteData.push({ firstName: data[i].firstName, lastName: data[i].lastName });
}
var template = kendo.template($("#javascriptTemplate").html());
var result = template(remoteData);
wnd.content(result);
wnd.center().open();
});
Here is my controller method
public ActionResult ListChild(String userId)
{
Debug.WriteLine("Passed Value: "+userId);
return view();
}