2011-02-16 107 views
0

如何重定向到PartialViewResult?我有错误消息:如何重定向到PartialViewResult

错误1 'MvcUI.Controllers.ExpenseController.SaveAuthorization(串)':并非所有的代码路径返回一个值

public ActionResult SaveAuthorization(string ExpenseID) 
    { 

     RedirectToAction("AuthorizeEmployee");    
    } 

    public PartialViewResult AuthorizeEmployee() 
    { 
     AuthorizeExpenseModel model = new AuthorizeExpenseModel(null, 0, "All"); 
     return PartialView("AuthorizeExpense_Details", model); 
    } 

回答

3

你需要把

return RedirectToAction("AuthorizeEmployee"); 

在您的SaveAuthorization操作中