This one has me baffled. I have 2 imagebuttons and a listbox. The image buttons work fine unless there are 2 items selected in the multiselect list box. Then when I click either imagebutton the listbox.selectedindexchange event fires and not the image click event. I'm runnig VS2010 and IE9.
Source:
<div style="float: right;">
<div style="text-align: left">
<asp:Label ID="GenealogyLabel" runat="server" Text="Coil Genealogy" ForeColor="Black"
Font-Bold="True"></asp:Label>
</br>
<asp:ImageButton ID="MinusIB" runat="server" ImageUrl="~/Images/minus.gif" />
<asp:ListBox ID="GenealogyLb" runat="server" AutoPostBack="true"></asp:ListBox>
<asp:ImageButton ID="PlusIB" runat="server" ImageUrl="~/Images/plus.gif" />
</br> </br>
<asp:Label ID="GraphsLabel" runat="server" Text="Available Graphs" ForeColor="Black"
Font-Bold="True"></asp:Label>
</br>
<asp:ListBox ID="GraphsLb" runat="server" AutoPostBack="true" SelectionMode="Multiple">
</asp:ListBox>
</div>
</div>
Code Behind:
Protected Sub MinusIB_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles MinusIB.Click
.... Minus Click
End Sub
Protected Sub PlusIB_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles PlusIB.Click
....Process Plus Click
End Sub
Protected Sub GraphsLb_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GraphsLb.SelectedIndexChanged
Response.Redirect("Default.aspx?)
End Sub