0

我的删除方法有效,但您必须手动刷新浏览器才能看到它已被删除。我只是想重新加载页面,但我无法让它工作。有人可以告诉我这样做的正确方法吗?

public virtual ActionResult Index()
{
    var recipientOrchestrator = new RecipientsOrchestrator();
    RecipientsViewModel model = recipientOrchestrator.GetRecipientsPageData();
    return View(model);
}


[HttpPost]
public virtual ActionResult Delete(int id, int applicationId) 
{
    var recipientOrchestrator = new RecipientsOrchestrator();
    recipientOrchestrator.DeleteRecipient(id, applicationId);

    return Index();

}
4

1 回答 1

5

尝试

return RedirectToAction("Index");
于 2012-09-19T03:19:35.717 回答