如何添加required到我认为需要JQuery Valiadation在单选按钮组上启用的输入字段之一。
我可以通过执行以下操作添加required到控件RadioButtonList
rbSeverity.Attributes.Add("required","");
但是如何将此属性添加到从<asp:ListItem>控件生成的输入之一中呢?
<asp:RadioButtonList ID="rbSeverity" RepeatDirection="Horizontal" RepeatLayout="Flow"
runat="server" >
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
</asp:RadioButtonList>