Validating two usercontrols

Rated 3.92/5 based on 823 customer reviews

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.

By using Get Client Id(), I don't need to apply the usercontrol's prefix to the desired control's ID; I can just access it by its straight ID.

It might seem a bit overwhelming, but it's actually quite simple.

Like with the Required Field Validator, we use the controltovalidate attribute to specify which control to validate.

validating two usercontrols-90

validating two usercontrols-48

As you see, we only use one validator to validate the two fields.

Any more questions, please open a new thread, do not respond to this thread anymore?

hi anyone that help how can set validator on user id that not accept space betwwen tow mean or exam ubaid expor so i need when come space then show error validator plz hlep as soon as possible i will thank full of u.

However, when I am creating my validation controls, dd Something is not an option when selecting which control to validate. You probably will make the Drop Down List field Public so it can be seen once you typecast the User Control object to the class of that User Control. Like Teemu said, its possible to use the Validation Property Attribute.

I tried using it anyways, and here is the error I get: Control 'dd Something' referenced by the Control To Validate property of 'vld Something' cannot be validated. You need to add a property to your usercontrol that returns a string value of the data.

Leave a Reply