Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Dear All,

I am trying to use Ajax (.Net 4.0) ComboBox SelectedIndex Change Event with following feature but no code has helped.

The ComboBox has the following properties:
AutoCompleteMode="SuggestAppend" DropDownStyle="DropDown"

I should be able to write any value in the ComboBox even if the Item does not exists in the comboBox, this works with setting the DropDownStyle="DropDown".

At the same time if the item does not exist in the Item List of ComboBox then it neither post back nor it should add item in the ComboBox (this is what i am trying to find solution for).

If the item exists in the Item List of ComboBox then it should postback (SelectedIndex Change event should fire).

I tried some java script but did not help.

I do really appreciate your cooperation.
Posted
Updated 13-Apr-11 0:46am
v2
Comments
Abdul Rahman Hamidy 20-Apr-11 2:17am    
Thanks, I did not find Add Comment button in two bellow solutions so I write my answer here, for sure the Property AutoPostBack is assigned to true, but my suggestion is different, the comboBox must postback only if the item written in combobox exists in itemList otherwise no postback should occur.

have you tried AutoPostBack="true" propety to your combobox
 
Share this answer
 
set
C++
AutoPostBack="true"
property of your combobox
 
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