J
JB
I have a client side function like this : the intention is to check a
couple of textboxes that reside inside a *usercontrol*. They must be
either both empty or both not empty else it is not valid.
Can anyone help? It always returns False a present...
<script language="vbscript">
Sub ClientValidate(source, args)
Dim ret As Boolean = True
'locate the user con'trol
_ucArrangement = DirectCast(FindControl("ucArrangementDetails1"),
CIC.ucArrangementDetails)
' Test whether the Account Number/BSB is/not Empty.
If _ucArrangement.BSBNumberControl.Text.Length > 0 AndAlso
_ucArrangement.AccountNumberControl.Text.Length = 0 Then
ret = false
End If
If _ucArrangement.BSBNumberControl.Text.Length = 0 AndAlso
_ucArrangement.AccountNumberControl.Text.Length > 0 Then
ret = False
End If
args.IsValid = ret
End Sub
</script>
couple of textboxes that reside inside a *usercontrol*. They must be
either both empty or both not empty else it is not valid.
Can anyone help? It always returns False a present...
<script language="vbscript">
Sub ClientValidate(source, args)
Dim ret As Boolean = True
'locate the user con'trol
_ucArrangement = DirectCast(FindControl("ucArrangementDetails1"),
CIC.ucArrangementDetails)
' Test whether the Account Number/BSB is/not Empty.
If _ucArrangement.BSBNumberControl.Text.Length > 0 AndAlso
_ucArrangement.AccountNumberControl.Text.Length = 0 Then
ret = false
End If
If _ucArrangement.BSBNumberControl.Text.Length = 0 AndAlso
_ucArrangement.AccountNumberControl.Text.Length > 0 Then
ret = False
End If
args.IsValid = ret
End Sub
</script>