I have a custom validator which does some server side validation:
Protected Sub cvDuplicateName_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles cvDuplicateName.ServerValidate
Dim strLegalNameNew As Object = Me.txtLegalNameNew.Text
Dim qta As New QueriesTableAdapter Dim objResult As Object = qta.udf_ExistsDuplicateCompanyName(strLegalNameNew)
'Dim bool As Boolean = qta.udf_ExistsDuplicateCompanyName(strLegalNameNew) THIS DOESN:T WORK
'Dim int As Integer = qta.udf_ExistsDuplicateCompanyName(strLegalNameNew) 'THIS DOESN"T WORK EITHER - what gives?
If objResult = True Then
args.IsValid = "false"
Else
args.IsValid = "true"
End If
End Sub
The problem is no matter what I do, objResult always is returning false and I can't fig ...
Go to the complete details ...