A
Alexey Smirnov
I don't have code for that yet. It is a question of concept. Is there a
control to verify that if one check box is not checked, then the other is?
As far as I remember you have to do a custom validator for checkbox.
But... why don't you like your own code?
If Checkemp.Checked AndAlso Checknon.checked Then
Empornon = "both"
ElseIf Checkemp.Checked Then
Empornon = "Employee"
ElseIf Checknon.checked Then
empornon= "Non-Employee"
Else Empornon = ""
End If
This gives you a value of Empornon (both, Employee, Non-Employee or
empty string). As I understand, you need to show an error when
Empornon is empty, right?
So, simply add
If Empornon = "" Then
Response.Write("ERROR: please define your status")
Exit Sub
End If