我有一个称为 Machinefilter 的视图
@using (Html.BeginForm())
{
<div id="filterDiv">
<fieldset>
<legend>Filter</legend>
<table>
<tr>
<td>
@Html.Label("Machine Serial No :")
</td>
<td>
@Html.TextBoxFor(m => m.MachineSrNo, new { @id = "SearchSerialNo" })
</td>
<td>
@Html.Label("City :")
</td>
<td>
@Html.DropDownListFor(m => m.CityId, new SelectList(ViewBag.Cities, "CityId", "CityName"), "--Select City--", new { @id = "drpCity" })
</td>
<td>
@Html.Label("Bank Branch :")
</td>
<td>
@Html.DropDownListFor(m => m.BankBranchId, new SelectList(ViewBag.BankBranch, "BankBranchId", "Name"), "--Select Bank Branch--", new { @id = "drpBankBranch" })
</td>
</tr>
</table>
</fieldset>
</div>
<p>
<input type="submit" value="Search" />
<input type="reset" value="Clear" />
</p>
}
每当我点击“搜索”按钮时,它都会显示默认验证。我没有对此观点进行任何验证。