【发布时间】:2016-02-25 20:05:12
【问题描述】:
我正在尝试创建搜索和结果页面。第一个UserTotalTimeSpentReport() 函数返回ActionResult,它是一个搜索页面。然后,用户进行一些选择并发布页面。然后,它会转到第二个UserTotalTimeSpentReport(),它有[HttpPost] 标签。在第二个UserTotalTimeSpentReport 中,我执行了一个复杂的 LINQ 查询并生成了一个结果。我不知道如何显示该结果,因为它与 ActionResult 相同。我需要将用户转发到另一个页面。这样做的正确方法是什么?
public ActionResult UserTotalTimeSpentReport()
{
UserTotalTimeSpentModel model = new UserTotalTimeSpentModel();
return View(model);
}
[HttpPost]
public ActionResult UserTotalTimeSpentReport(string AntsoftCrmUser, DateTime? StartDate, DateTime? EndDate)
{
.....
.....
return View(result)
}
【问题讨论】:
标签: c# linq actionresult