0
當試圖應用數據註解時,我正面臨着問題。在我的情況即時傳遞的FormCollection在控制器在asp.net中應用數據註解的問題mvc2
[HttpPost]
public ActionResult Create(string Button, FormCollection collection)
{
if (ModelState.IsValid)
{
}
else
{
}
}
和ModelState.IsValid狀態總是有真正的價值。儘管我在View中留下了一些空白字段。此外,EnableClientValidation()也適用於View以進行客戶端驗證,但不起作用。可能是什麼問題