I am using an update panel . In this update panel, there is a listbox control. I actually set autopostback property to false in code behind. But still it executing SelectedIndexChanged event if the selected index is changed.
Why this happens?
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:MultiView ID="mvForms" runat="server" ActiveViewIndex="1">
<asp:View ID="View1" runat="server">
<asp:Panel ID="Panel5" runat="server" GroupingText="Available Evaluation Forms" meta:resourcekey="rsKey_panel5"
Width="100%">
<asp:ListBox ID="lbAvailableForms" runat="server" AutoPostBack="true"
style="height: 125px; width: 95%;"
onselectedindexchanged="lbAvailableForms_SelectedIndexChanged"></asp:ListBox>
</asp:Panel>
</asp:View>
<asp:View ID="View2" runat="server">
<asp:Panel ID="Panel11" runat="server" GroupingText="Available Evaluation Forms" meta:resourcekey="rsKey_panel11" Width="100%">
<div style="height: 125px; width: 95%; text-align:center;">
<br />
<br />
<asp:Label ID="lblAllSelected" runat="server" Text="All Selected" meta:resourcekey="rsKey_lblAllSelected"></asp:Label></div>
</asp:Panel>
</asp:View>
</asp:MultiView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="RLCompareParameter" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="cbAllForms" EventName="CheckedChanged"></asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
The listbox name is lbAvailableForms. While debugging i checked the autopostback property of this list box control, then i found that the property is false. Its looking so strange then how the selectedindexchanged event firing
Here cbAllForm is a check box control and RLCompareParameteris a radilo list.
Sometimes i need to get auto postback property is true. So initially i set this property to true. under RLCompareParameter_SelectedIndexChanged event , i set lbAvailableForms.Autopostback=false. But still after setting the property to false ,the listbox firing selected indexchanged event