on your second one you're doing thisDim txtValid As RequiredFieldValidatorI think you need this, else you won't have an instance of this classDim txtValid As RequiredFieldValidator = new RequiredFieldValidator()