0
我有这两个下拉列表,都应该是年龄和我想要让这个你不能做比最大年龄2下拉列表mvc4创建自定义的验证
<div class="col-lg-3 col-md-3 col-sm-3 editor-group ">
@Html.Label("Mininum Age")
@Html.DropDownListFor(model => model.Preference.MinAgeId, new SelectList(Model.MinAges, "AgeId", "CurAge", Model.Preference.MinAgeId),"-Any-", new { @class = " form-control" })
@Html.ValidationMessageFor(model => model.MinAges)
</div>
<div class="col-lg-3 col-md-3 col-sm-3 editor-group ">
@Html.Label("Maximum Age")
@Html.DropDownListFor(model => model.Preference.MaxAgeId, new SelectList(Model.MaxAges, "AgeId", "CurAge", Model.Preference.MaxAgeId),"-Any-", new { @class = " form-control" })
@Html.ValidationMessageFor(model => model.MaxAges)
</div>
我不知道,较高的最低年龄如果我创建下拉列表的方式可以使用此nuget包MVC Foolproof Validation来标记它在其他所有下拉列表之间是否无效
正是我需要感谢 – imGreg