Delete a control from a User control?

M

MattB

I have a user control that gets dynamically added to a page. It has a
couple of validators that I programmatically set properties for. All of
this works, but my problem is:
When not in use, I make validators Visible property = False
But the validators still take up space on the page, shifting other
elements if they wrap, etc.

Can I just delete the validator control from the user control? I fished
around the me.Controls collection a little but couldn't see a way to do
it. If you have any suggestions, I'd love to hear them!

Thanks!

Matt
 
M

MattB

Brock said:
Set the Display property to ValidatorDisplay.None

-Brock
http://staff.develop.com/ballen

What is this a property of? The page? The User Control?
I didn't see it I still have another validator I want to use (Required
field) and I just want the RegEx validator to go away.
Thanks for the reply!

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top