Phillh
Newcomer
Hi All...
This has been driving me bonkers all day...
I am running this code below to validate a user entry in a textbox is an integer:
and I keep getting...
Object reference not set to an instance of an object.
at the v1.validate() bit...
Any Ideas....Thanks
Phill
This has been driving me bonkers all day...
I am running this code below to validate a user entry in a textbox is an integer:
Visual Basic:
If txtqty.Text = "" Then
strqty = "Enter a number only for quantity."
Else
vd1.ControlToValidate = "txtqty"
vd1.Operator = ValidationCompareOperator.DataTypeCheck
vd1.Type = ValidationDataType.Integer
vd1.ErrorMessage = "Enter a number only for quantity."
vd1.Validate()
If vd1.IsValid = False Then strqty = vd1.ErrorMessage
End If
Object reference not set to an instance of an object.
at the v1.validate() bit...
Any Ideas....Thanks
Phill
Last edited by a moderator: