Validating custom control


19-Jun-2016 21:24

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.

If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.

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.

How can I expose this control via the usercontrol to allow validation?

I do want the validation and message all in the user control. Check Control Validation Property(String name, String property Name) at System. Hi, I have a custom control allowing the user to enter a username and the system to retrieve the user id that correspond with the user name.I have a wrapper User Control control around a Drop Down List for managing language specific translation on the Drop Down List values.

I also have a required field validator that is requried for the inner dropdownlist.

Interesting to say, the username is created as a combination of a dropdownlist and a textbox.