I want to fetch record from controller this code work fine on page ready event, but with i save new record and want to fetch list of new record, code return old record...
function FetchMessage(Id) {
$("#SearchResult").empty();
$.getJSON("/home/BusinessMessages", { busId: Id }, function (data) {
for (var i = 0; i < data.length; i++) {
$("#SearchResult").append('<div> <div class="nameHd">' + data[i].messagebody + '<div class="icon"><img src="../../Content/images/arrow-msg.gif" alt="" /></div></div><div class="imgBox"><img src="' + data[i].imageurl + '" alt="" /></div></div><div class="clr"></div>');
}
$("#record").html(data.length + " messages");
});
}
Function BusinessMessages(ByVal busID As String) As JsonResult
Return Json(home.GetMessageByBusId(busID),JsonRequestBehavior.AllowGet)
End Function