First of all, I apologize because I can not present code. The problem is as follows in an asp.net webforms application, I have 2 listboxes and each one has the SelectedIndexChanged event, (the code within those events is simply moving one item from one list to the other and vice versa) which are handled when there is PostBack and when some element is selected. I have a simple button with the click event but without code, let's say it simply serves to make PostBack. Now, the problem arises because I have another button which activates another event but if I have an item selected from any of the listbox, what is executed is first the SelectedIndexChanged event and then the event that the second button calls and actually I just want the second button event to be executed, I mean? How could I avoid this?
As you can see in this example image, if I click on the Save button, having selected an item from the listbox on the left, what the application does is call the SelectedIndexChanged event of that listbox and then after that call the Save event, and this works like that because of the PostBack issue. Is there any good way to implement that to avoid that?