I have an UpdatePanel with two ListBoxes in them. What I want to happen is that when the page loads the first ListBox fills with some data. When the user selects and item the second ListBox should be populated with the pertinent data.
Here is what happens, the first ListBox is filled with data, the user selects an item and the SelectedIndexChanged event fires, but the selection gets cleared before method can see which item was selected?
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<table class="listBoxTable">
<thead>
<tr>
<th>
Please select a magazine to add articles to.</th>
</tr>
</thead>
<tr>
<td>
<asp:ListBox ID="lbMagazines" runat="server" Height="300px" Width="250px"
onselectedindexchanged="lbMagazines_SelectedIndexChanged" DataTextField="Title"
DataValueField="Id" AutoPostBack="True">
</asp:ListBox>
</td>
<td>
<asp:ListBox ID="lbIssues" runat="server" Height="300px" Width="250px"
Enabled="False" DataTextField="Title" DataValueField="Id">
</asp:ListBox>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>