How do I redirect to a PartialViewResult? I am having the error message:
Error 1 'MvcUI.Controllers.ExpenseController.SaveAuthorization(string)': not all code paths return a value
public ActionResult SaveAuthorization(string ExpenseID)
{
RedirectToAction("AuthorizeEmployee");
}
public PartialViewResult AuthorizeEmployee()
{
AuthorizeExpenseModel model = new AuthorizeExpenseModel(null, 0, "All");
return PartialView("Aut开发者_高级运维horizeExpense_Details", model);
}
You need to put
return RedirectToAction("AuthorizeEmployee");
in your SaveAuthorization action
精彩评论