I have a series of switches, I need to choose when the user clicks the submit button:
@Html.RadioButtonFor(o => o.EquityOrder.OrderAction, EnumOrderAction.B, new {id = "actionBuy"}) @Html.RadioButtonFor(o => o.EquityOrder.OrderAction, EnumOrderAction.S, new {id = "actionSell"})
Is there a way to guarantee that the form will not be submitted and that the @ Html.ValidationSummary () element is filled with the string "OrderAction must be selected"?
asp.net-mvc razor asp.net-mvc-4
BahaiResearch.com
source share