My method does not go to success block inside the javascript method. can anybody tell what I am doing wrong?
FYI, I tested business layer and it returns properly.
Here is my code below:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.ajax({
type: 'GET',
url: '@Url.Action("myActionName", "Notice")',
data: { Name: $("#txtQueryString").val() },
dataType: 'json',
cache: false,
success: function (result) {
var tr;
for (var i = 0; i < result.length; i++) {
tr = $('<tr>');
tr.append("<td>" + result[i].Month + "</td>");
tr.append("<td class='currency'>" + result[i].Total1 + "</td>");
tr.append("<td class='currency'>" + result[i].Total2 + "</td>");
tr.append("<td class='currency'>" + result[i].Total3 + "</td>");
tr.append("</tr>'");
tr.appendTo('#homeTable1');
}
}
});
}
});
</script>
Notice Controller========================
public JsonResult myActionName(string Name)
{
some filled object
return Json(result, JsonRequestBehavior.AllowGet);
}