开发者

How to redirect to a PartialViewResult

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜