i have a listbox in a grid and i'm trying to access the values populated in the listbox during the row updating event.
<ItemTemplate>
<asp:ListBox ID="InsuranceLB" runat="server" Width="225px" Height="75px" SelectionMode="Multiple" style="margin-top:2px;" autoscroll="true" /><br />
</ItemTemplate>
<ItemStyle VerticalAlign="Top" />
</asp:TemplateField>
This is how i'm trying to get the values
ListBox myListBox = (ListBox)GridView1.Rows[e.RowIndex].Cells[14].FindControl("InsuranceLB");
An error isn't thrown but i don't get the listbox values either. Any direction would be appreciated. Thanks in advance.
Our community of experts have been thoroughly vetted for their expertise and industry experience.