Validating two usercontrols
A User Control itself cannot be validated because it doesn't generate any HTML. Professional Validation And More lets you assign the control object as an alternative to the ID. Notice that there isn't a Control To Validate property.
You need a control inside it (like that Drop Down List) to validate. Control To Validate property to the ID of the Drop Down List (or whatever data entry control you are evaluating.) Unforunately, Microsoft built the Validators so that the Control To Validate property allows the other control only in the same naming container. So a validator outside the User Control cannot assign the ID of any control within it. When you do, you can have the validator in a different naming container. Bob Gibilaro I want the Property "My Property Is AText Box" to be the validation property? : [Validation Property Attribute("My Property Is AText Box-Text")] Or what? And do you know about exactly what the colon is doing here ? You are mimicking the format of the Unique ID, which is a list of IDs of all naming containers above the control, plus the control itself, separated by a special character.
Regards, Variable Hi, Can i call any of this function in the text box event, for example i have HTML textbox, in Key Press event can i call this function, i have requirement to validate the texbox to numbers only, if yes how can i can any body suggest me. You are right Anzer: I was totally missing the main point.