Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
Is it possible to create RequiredFieldValidator with more than one Initial Value? Like below ex.

Ex:
<asp:RequiredFieldValidator ID="reqValidator" ValidationGroup="VGroup" runat="server" ControlToValidate="ctrlDropdown" ErrorMessage="Required" InitialValue="Value1,Value2">

Please correct me if am wrong.
Posted
Comments
ZurdoDev 28-Sep-15 8:08am    
Why would you want that?
deepankarbhatnagar 28-Sep-15 8:40am    
Hi, please elaborate your query..

1 solution

No[^] - a control can only have one value, therefore only one initial value is meaningful.

If you are looking for validation of "not one of x" you will need to work off CustomValidator[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900