I have this jquery function placed in my .js file.... As long as my page is loaded this works... but when i changed it to return as a partial view.... this alert wont work anymore... How is it gonna be working again ?
$(document).ready(function () {
var msg = '@ViewBag.Message';
if (msg == '1')
alert("New Time Shift has been saved.");
});
In my controller action...
if (Request.IsAjaxRequest())
return PartialView("_RecordList", userRecord); //alert wont work here...
return View(userRecord); //this will return the whole view thus the alert works here