0
我正在嘗試創建搜索和結果頁面。第一個UserTotalTimeSpentReport()
函數返回一個搜索頁面的ActionResult。然後,用戶做一些選擇併發布頁面。然後,它將轉到第二個UserTotalTimeSpentReport()
,其中有[HttpPost]
標記。在第二個UserTotalTimeSpentReport
中,我執行一個複雜的LINQ查詢併產生一個結果。我不知道如何顯示該結果,因爲它採用相同的ActionResult。我需要將用戶轉到另一個頁面。這樣做的正確方法是什麼?如何爲搜索和結果創建ActionResults,無法找出
public ActionResult UserTotalTimeSpentReport()
{
UserTotalTimeSpentModel model = new UserTotalTimeSpentModel();
return View(model);
}
[HttpPost]
public ActionResult UserTotalTimeSpentReport(string AntsoftCrmUser, DateTime? StartDate, DateTime? EndDate)
{
.....
.....
return View(result)
}