D
darrel
I have a dropdown list, 'DrpDwnContacts' that I want to validate and see if
the first item is select. If it is, It's not valid.
So, I've added a customValidator, 'DrpDwnContacts_CustomValidator' which
creates a sub, 'DrpDwnContacts_CustomValidator_ServerValidate'
The question is, what do I put in that function to get it to return a
isValid response?
This is what I have:
Private Sub DrpDwnContacts_CustomValidator_ServerValidate(ByVal source As
System.Object, ByVal args As
System.Web.UI.WebControls.ServerValidateEventArgs) Handles
DrpDwnContacts_CustomValidator.ServerValidate
if DrpDwnContacts.Items(0).Selected = True then
DrpDwnContacts_CustomValidator.IsValid = False
else
DrpDwnContacts_CustomValidator.IsValid = True
End If
End Sub
But that doesn't seem to be working.
-Darrel
the first item is select. If it is, It's not valid.
So, I've added a customValidator, 'DrpDwnContacts_CustomValidator' which
creates a sub, 'DrpDwnContacts_CustomValidator_ServerValidate'
The question is, what do I put in that function to get it to return a
isValid response?
This is what I have:
Private Sub DrpDwnContacts_CustomValidator_ServerValidate(ByVal source As
System.Object, ByVal args As
System.Web.UI.WebControls.ServerValidateEventArgs) Handles
DrpDwnContacts_CustomValidator.ServerValidate
if DrpDwnContacts.Items(0).Selected = True then
DrpDwnContacts_CustomValidator.IsValid = False
else
DrpDwnContacts_CustomValidator.IsValid = True
End If
End Sub
But that doesn't seem to be working.
-Darrel