Click here to Skip to main content
16,019,152 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone help me in solving the problem?

I have a combobox with the items:

XML
<asp:ComboBox ID="ComboBox2" runat="server" AutoCompleteMode="SuggestAppend" CaseSensitive="false">
   <Items>
      <asp:ListItem>--select--</asp:ListItem>
      <asp:ListItem>apple</asp:ListItem>
      <asp:ListItem>bat</asp:ListItem>
      <asp:ListItem>cat</asp:ListItem>
      <asp:ListItem>eat</asp:ListItem>
      <asp:ListItem>mat</asp:ListItem>
   </Items>
</asp:ComboBox>



When I am typing 'apple' it is hilighting apple but
When I am typing 'zyx' it is not hilighting because it is not there in items list.

But, when I AM PRESSING SAVE BUTTON it allowing 'zyx' into database.
I need if entered text is not matched, text has to get clear or I should not allow wrong text
Posted
Updated 30-Oct-10 8:48am
v3
Comments
shakil0304003 30-Oct-10 3:57am    
I am not familiar with the <asp:ComboBox control. Do you give a link to familiar with it.

You should use listbox[^] instead of combobox to not allow anything other than the items you allow from code.
 
Share this answer
 
 
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