📜  带参数模型的重定向操作 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:33.350000             🧑  作者: Mango

代码示例1
[HttpPost]
public ActionResult FillStudent(Student student1)
{
    TempData["student"]= new Student();
    return RedirectToAction("GetStudent","Student");
}

[HttpGet]
public ActionResult GetStudent(Student passedStd)
{
    Student std=(Student)TempData["student"];
    return View();
}