Hi RichardSa,
Refer below code.
HTML
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" />Mango
<asp:CustomValidator ID="question1" runat="server" Display="Dynamic" ErrorMessage="Please Choose"
OnServerValidate="OnServerValidate" ValidationGroup="ProductCheck" ForeColor="Red"></asp:CustomValidator>
<br />
<asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="true" />Apple
<asp:CustomValidator ID="CustomValidator1" runat="server" Display="Dynamic" ErrorMessage="Please Choose"
OnServerValidate="OnServerValidate" ValidationGroup="ProductCheck" ForeColor="Red"></asp:CustomValidator>
<br />
<asp:CheckBox ID="CheckBox3" runat="server" AutoPostBack="true" />Orange
<asp:CustomValidator ID="CustomValidator2" runat="server" Display="Dynamic" ErrorMessage="Please Choose"
OnServerValidate="OnServerValidate" ValidationGroup="ProductCheck" ForeColor="Red"></asp:CustomValidator>
<br />
<asp:Button Text="Save" runat="server" OnClick="OnSave" ValidationGroup="ProductCheck" />
Code
C#
protected void OnServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = CheckBox1.Checked || CheckBox2.Checked || CheckBox3.Checked;
}
protected void OnSave(object sender, EventArgs e)
{
if (Page.IsValid)
{
}
}
VB.Net
Protected Sub OnServerValidate(ByVal source As Object, ByVal args As ServerValidateEventArgs)
args.IsValid = CheckBox1.Checked OrElse CheckBox2.Checked OrElse CheckBox3.Checked
End Sub
Protected Sub OnSave(ByVal sender As Object, ByVal e As EventArgs)
If Page.IsValid Then
End If
End Sub