我正在使用c#進行編碼!在C中驗證複選框和單選按鈕#
下面是我的複選框,並radion按鈕HTML
<input type="radio" style="float: left;" name="documents" id="Checkbox9" value="yes"
runat="server" />
<label style="width: 35px!important;" class="checkbox">
<%=GetResourceString("c_HSGStudent")%>
</label>
<input type="radio" style="float: left;" name="documents" id="Checkbox10" value="no"
runat="server" />
<label style="width: 25px!important;" class="checkbox">
<%=GetResourceString("c_HSGParent")%>
</label>
<input type="radio" style="float: left;" cheked name="documents" id="Radio1" value="yes"
runat="server" />
<label style="width: 35px!important;" class="checkbox">
<%=GetResourceString("c_HSGStudent")%>
</label>
<input type="radio" style="float: left;" name="documents" id="Radio2" value="no"
runat="server" />
<label style="width: 25px!important;" class="checkbox">
<%=GetResourceString("c_HSGParent")%>
</label>
你可以看到我有兩個複選框和兩個單選按鈕,我的問題是,在我的提交按鈕點擊我要檢查用戶是否在檢查至少一個複選框或單選按鈕。如果我們可以使用.NET解決方案(customvalidator),那將會很好。
請建議!
感謝