开发者

DropdownList has validation error when EnableClientValidation = false

开发者 https://www.devze.com 2023-03-25 11:16 出处:网络
I have a problem where my view is reporting a input-valida开发者_开发问答tion-error on a dropdownlist.

I have a problem where my view is reporting a input-valida开发者_开发问答tion-error on a dropdownlist.

I get this error in Microsoft MVC 3 and do not have an Data annotations on my model.

I have also disabled Client validation on my form by setting Html.EnableClientValidation(false);

My List is: <%: Html.DropDownListFor(model => Model.EventStatusFilter, Model.eventStatus, "--Status Filter--")%>

I don't understand why MVC is requiring validation in this instance.

Thanks in advance


This seems to be a bug as far as I can decern.

I found a reference to some codeplex workitems for MVC here: http://forums.asp.net/t/1649193.aspx/1?MVC+3+dropdownlist+validation+not+working+for+complex+view+model

Have a look at the following workitem for MVC4: http://aspnet.codeplex.com/workitem/7629

There are related workitems for MVC3: http://aspnet.codeplex.com/workitem/4932

0

精彩评论

暂无评论...
验证码 换一张
取 消