Validating a dynamically created control?

sjc0311

New member
Joined
Feb 26, 2003
Messages
3
I am trying to do some validation on a TextBox control that I created dynamically and I was wondering if anyone could help. I create the TextBox and add it to a Placeholder when the user clicks a link by calling a method that returns the TextBox. However, when I try to perform some validation with a static control, the validator cannot see the TextBox control. Any help please?
 
Depends :)

Is the "dynamically created" Textbox placed in a container? Most probably.

So you could get your main container (form probably) and recurse through its containers collection. There you could either build you own collection of "validatable controls" (to filter out tabpages, groupboxes etc) or you could directly ask the controls to validate themselves.
 
Back
Top