📜  带参数的redirecttoaction - 任何代码示例

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

代码示例3
[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();
}