Hi all,
I have a asp.net form, inside has a webcombo, I placed a requiredfieldvalidator and want to validate it, but cannot choose the webcombo control inside the requirefieldvalidator.
Can you suggest me how to ensure user choose a value in webcombo before submit the form?
Thank you very much for your help! Happy new year!
The UltraWebCombo does not have the typical attribute of a control such as:
[ValidationProperty("DataValue")]
which enables a required field validator to work. In hindsight this makes sense because depending on your usage of the control (for instance, a user can type in free text) DisplayValue is correct versus DataValue. So, what you really want to do is use a custom validator on the webcombo. This gives you the latitude to interrogate whichever attribute is your (mental) appropriate Validation Property of interest.
Thanks for your reply!
But I tried to place a customvalidator in the asp.net page. But in the customvalidator cannot chooose the webcombo in "ControlToValidate" value. Can you teach me how to make it work? Thanks!