MVC 视图 如何向 Edit(int id, FormCollection collection) 传参
MVC 视图 如何向 Edit(int id, FormCollection collection) 传参如何写呢
控制器的方法如下
public ActionResult Edit(int id, FormCollection collection)
{
try
{
// TODO: Add update logic here
return RedirectToAction("Index");
}
catch
{
return View();
}
}
视图的代码我只会写
<form action="/Japchk/Edit?@Model.ID" , method="post"> 是否有误 ,如何纠正呢