I have jquery function which looks like this
function MonitorLoadStatus(loadId) {
var url = 'LoadAdmin/GetLoadStatus/' + loadId;
$.get(url, function (data) {
if (data != "complete") {
$("img[id =" + loadId + "]").show();
window.setTimeout(function () {
MonitorLoadStatus(loadId);
}, 1000);
}
else {
$("img[id =" + loadId + "]").hide();
};
});
}
and an MVC method which looks like this
public ActionResult GetLoadStatus(string loadId)
{
// check some thing and return stuff
return Content(currentProgress);
}
The loadid to the above method is being passed as null from the jquery get method. What exactly am i doing wrong