I created a control and a RequiredField Validator programatically .
My problem is when I tried to set the RequiredFieldValidator.ControlToValidate = Control, it gives me an error .
For example:
dim text as Textbox
dim required as RequiredFieldValidator
text = new Textbox
required = new RequiredFieldValidator
required.ControlToValidate = text (!! Error in this line)
It gives me an error when I tried to assigned the textbox control to the validator .
Any ideas ?
Thanks,
Hang
My problem is when I tried to set the RequiredFieldValidator.ControlToValidate = Control, it gives me an error .
For example:
dim text as Textbox
dim required as RequiredFieldValidator
text = new Textbox
required = new RequiredFieldValidator
required.ControlToValidate = text (!! Error in this line)
It gives me an error when I tried to assigned the textbox control to the validator .
Any ideas ?
Thanks,
Hang