I know this question has been asked before, but I can't find an answer to this question that isn't less than six years old, so I'm hoping for an update.
I've discovered that the OnSelectedIndexChanged event for a ComboBox will not fire more than once in my Visual Studio projects. Breakpoints confirm that the OnSelectedIndexChanged event isn't firing at all from the second time onward, and I can't figure out why. Even in a brand new project, I get this issue, both on my local machine and on my web server.
I'm using v20.1.0 of the AjaxControlToolkit, and .NET Framework 4.7.2. I'm building the project in Visual Studio 2019 Community v16.7.7.
Here's my source code, front- and back-end. I hope someone can shed some light on this.
<form id="form1" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><div id="container"><ajaxToolkit:ComboBox ID="colorCB" AutoPostBack="true" OnSelectedIndexChanged="colorCB_SelectedIndexChanged" runat="server"><asp:ListItem Text="-- Select --" Selected="True"></asp:ListItem><asp:ListItem Text="Red"></asp:ListItem><asp:ListItem Text="Orange"></asp:ListItem><asp:ListItem Text="Yellow"></asp:ListItem><asp:ListItem Text="Blue"></asp:ListItem><asp:ListItem Text="Green"></asp:ListItem></ajaxToolkit:ComboBox><p /><asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="colorCB" /></Triggers></asp:UpdatePanel></div></form>
And on the back end:
protected void colorCB_SelectedIndexChanged(object sender, EventArgs e)
{
string defalt = "Please select a color above.";
int i = colorCB.SelectedIndex;
string t = i > 0 ? "You selected " + colorCB.SelectedValue : defalt;
Label1.Text = t;
}