Hi,
I want to fire select index change event on selection of value from combo box but i want to fire that event when i am selecting same value from dropdown. Like i have 4 value in drop down and i select 2 value from drop down than the select index change fires but i want to fire select index change again on selection of 2.
Please reply as soon as possible.
Thanks
Manish
I want to fire select index change event on selection of value from combo box but i want to fire that event when i am selecting same value from dropdown. Like i have 4 value in drop down and i select 2 value from drop down than the select index change fires but i want to fire select index change again on selection of 2.
Please reply as soon as possible.
Thanks
Manish
Every item in the ComboBox has an index. When the selection changes, the selected index will be different, and so the ComboBox will trigger the SelectedIndexChanged event.
To trigger the SelectedIndexChanged - server event the AutoPostBack property must be set to True. Otherwise, the ComboBox will not make a postback at all. The OnClientSelectedIndexChanged - client event triggers in all cases.
It is not possible to Trigger the event only for certain Values. The event is triggered every time the selection changes, regardless of the values.
However, you can cancel the selection for certain items. For example, you can prevent users to select a certain item from the list. That can be achieved by canceling the event in the OnClientSelectedIndexChanging - client event, thus preventing the selection change.
If the Combo is not working as expected, there might be exceptions on the page which you will need to investigate. Always keep an eye on the Console tab in the Browser's DevTools.
Here are a couple of articles on the topic: