mariacri11
Programmer
Hello!
Here is my problem:
I have an editable datagrid with edititem templates.
I want to validate the data entered into the grid using a RegularExpressionValidator, but I get this error:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 23: valid.Validate
The code I am using is:
Dim valid as RegularExpressionValidator=new System.Web.UI.WebControls.RegularExpressionValidator
valid.ErrorMessage="eroarrrrrrrrrrrrrrrre!!!!!!!!!!"
valid.ValidationExpression="\d{3}"
valid.ControlToValidate="test"
valid.Validate
Here is my problem:
I have an editable datagrid with edititem templates.
I want to validate the data entered into the grid using a RegularExpressionValidator, but I get this error:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 23: valid.Validate
The code I am using is:
Dim valid as RegularExpressionValidator=new System.Web.UI.WebControls.RegularExpressionValidator
valid.ErrorMessage="eroarrrrrrrrrrrrrrrre!!!!!!!!!!"
valid.ValidationExpression="\d{3}"
valid.ControlToValidate="test"
valid.Validate