Validating custom control

The idea now is to have (input)validation in the usercontrol, so that the custom control will show an error when the user enters a non-existing username == no id can be retrieved from the DB on this input.It would be great that validation can be triggered by calling the Page.I have to following control: the custom control is validated client side and produces an error message when there is in fact a valid date in the Drop Down Lists. I haven't tested this at all, but below is a simple code example to demonstrate the concept.I've been trying to figure out why and ended up at the following javascript generated by which I think never will come up with resulting in the correct value: So I believe I have to add something to my custom control, perhaps a piece of javascript, that gets called as soon as the validator tries to validate my control and produces the correct value to validate against from the selected items of the three Drop Down Lists. Obviously, you would build the validation function in code using a ok, I understand what you are saying but how does this make the client side validator validate against a combination of the 3 Drop Down List's selected items as a date?Is Valid: Validate which also validate normal required fields etc...I do want the validation and message all in the user control.The control is used on many pages, by different developers who don't/shouldn't know how it works.So how can I insert this validation in the control??

validating custom control-80validating custom control-44validating custom control-33

I understand your points but prefer to approach the problem from the other way, namely adapting the custom control in such way that the Compare Validator works with it.

The reason for this is that all controls and validators are dynamically created based on the fields and the datatype that the database expects.

I think your solution is feasible but since the Compare Validator works server side, I have the feeling that it should be possible to make it work client side as well.

but when i try to apply the same Required Field Validator to my custom control it is not possible.

The property "Control To Validate" does not show the object id of my custom control.

4

Leave a Reply

  1. dating sex local 97850 18-Apr-2017 18:47

    Some sites enable you to upgrade via your mobile and this shows only as a reference number on your phone bill.