我想知道,有什么技术可以Model作为参数传递给RedirectToAction
例如:
public class Student{
public int Id{get;set;}
public string Name{get;set;}
}
控制者
public class StudentController : Controller
{
public ActionResult FillStudent()
{
return View();
}
[HttpPost]
public ActionResult FillStudent(Student student1)
{
return RedirectToAction("GetStudent","Student",new{student=student1});
}
public ActionResult GetStudent(Student student)
{
return View();
}
}
我的问题-我可以在RedirectToAction中传递学生模型吗?
慕斯709654
阿波罗的战车