Funkymonkey
08-23-2005, 05:29 AM
If no category is chosen off my list (the selected index is 0) My form displays the correct error message but it still updates the database. I have this:
Private Sub CustomValidator2_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator2.ServerValidate
If rfqCategoryDropDown.SelectedIndex = 0 Then
args.IsValid = False
Else : args.IsValid = True
End If
End Sub
But it's obviously wrong.
Please help me :)
Private Sub CustomValidator2_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator2.ServerValidate
If rfqCategoryDropDown.SelectedIndex = 0 Then
args.IsValid = False
Else : args.IsValid = True
End If
End Sub
But it's obviously wrong.
Please help me :)