In my application I have used list box as multiselect mode. I need to Fire SelectedIndexChanged event
for list box without using
autopostback(AutoPostBack=True)
in c#. How can I do that?
In my application I have used list box as multiselect mode. I need to Fire SelectedIndexChanged event
for list box without using
autopostback(AutoPostBack=True)
in c#. How can I do that?
Take your List Box into update panel, see below:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:ListBox ID="ListBox1" SelectionMode="Multiple" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged" AutoPostBack="true" runat="server">
<asp:ListItem Text="text 1" Value="0"></asp:ListItem>
<asp:ListItem Text="text 2" Value="1"></asp:ListItem>
<asp:ListItem Text="text 3" Value="2"></asp:ListItem>
<asp:ListItem Text="text 4" Value="3"></asp:ListItem>
<asp:ListItem Text="text 5" Value="4"></asp:ListItem>
</asp:ListBox>
</ContentTemplate>
</asp:UpdatePanel>