Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello folks,
can any one tell me,how to use the regularfieldvalidator for editable combobox.Its working for textbox with no errors...but its not working for combobox..please do help me in this regard.If any links said to be appriciated.

Its urgent,please any suggestions.

Thanks
Pradeep CBZ
Posted

 
Share this answer
 
Comments
Mohamed Mitwalli 17-May-12 15:03pm    
+5 :)
Prasad_Kulkarni 18-May-12 0:03am    
Thank you Mohamed!
Hi ,
Check this
ASP.NET
<div>
<asp:Button ID="Button2" runat="server" Text="Button" ValidationGroup="ss" />
<asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True"
    ValidationGroup="ss">
<asp:ListItem Text="---select---" Value="0" ></asp:ListItem>
<asp:ListItem Text="---Mohamed---" Value="1" ></asp:ListItem>

</asp:DropDownList>
<asp:CompareValidator ID="CompareValidator1" runat="server"
    ControlToValidate="DropDownList1" Display="Dynamic"
    ErrorMessage="CompareValidator" ForeColor="#FF3300" Operator="GreaterThan"
    SetFocusOnError="True" ValueToCompare="0" ValidationGroup="ss"></asp:CompareValidator>
    </div>

Best Regards
M.Mitwalli
 
Share this answer
 
Comments
Prasad_Kulkarni 17-May-12 8:26am    
This is right enough, and not worth of downvote.
My +5!
Mohamed Mitwalli 17-May-12 15:04pm    
Thanks Prasad :) don't know why it downvote :(

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