0
你可以看到什麼GET刪除操作方法傳遞DDW2File對象來查看。是否有可能以某種方式將此對象綁定回ddw2file參數POST刪除操作方法?現在我有null它的價值。POST操作方法的參數綁定
的代碼片段:
public class DDW2FileController : Controller
{
...
public ActionResult Delete(string fileName)
{
return View(repository.GetFile(fileName));
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Delete(DDW2File ddw2file)
{
repository.Delete(file);
return RedirectToAction("Index");
}
}
...
public class DDW2File
{
public string Name { get; set; }
public long Length { get; set; }
}
謝謝!
謝謝。現在也閱讀關於ModelBinders ... – 2009-04-22 12:16:27