我有一个 MVC 4 应用程序,并且正在使用 HTML.BeginForm 在视图上创建一个表单。我有几个字段集,我在其中绝对定位了它们。例如,这是我的 BeginForm 和我的字段集之一:
<div style="width:1100px; height:490px;">
@using (Html.BeginForm("Create", "BicycleSellerListing", FormMethod.Post, new { enctype = "multipart/form-data" })) {
@Html.ValidationSummary(true)
<fieldset style="position:absolute; top:180px; left:150px; width:550px">
<legend>Bicycle Information</legend>
...
...
问题是,如果在提交完成时 ModelState 中有错误,则生成的错误会被字段集中的某些字段覆盖。有没有办法可以指示我希望模型状态错误显示在哪里?