我正在使用ajax請求獲取我的項目中的PartialViews之一。我想通過INotifier傳遞一條消息。 Cuttently我使用HttpStatusCodeResult return new HttpStatusCodeResult(204, "Message");
傳遞有關錯誤的信息,但不是令人滿意的解決方案。ajax響應果園通知
$(this).load($(this).attr("href"), function (response, status, xhr) {
if (xhr.status == 204) {
// show message
}
});
我想知道在ActionResult中使用標準INotifier.Error()
是可能的。