if i call a ajax request using jquery to an asp.net mvc controller action and inside that action an exception gets thrown, what is the best way to capture that and show something to the user.
right now my loading image just goes on forever . . . .
here is an example of my controller code:
public ActionResult BatchAdd(int[] sharepointKeys)
{
MyViewModel vm = GetViewModel();
return PartialView("MyPartialView", vm);
}
c#
js:
With return ActionResult:
Index.asp:
Site.master:
MyPartialView.ascx:
HomeController.cs: