I have a server dropdownlist in an Ajax updatepanel. When I use the mouse to click on an item it fires the postback but when I click the up/down arrow to change entries, this is not firing. What could be reason?
Try setting the 'AutoPostBack' property of the DropDownList control to 'true'.
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true">
</asp:DropDownList>
See ListControl.AutoPostBack Property on MSDN for more info
Gets or sets a value indicating whether a postback to the server automatically occurs when the user changes the list selection.
Try this:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" onKeyUp="this.blur();">
With onKeyUp="this.blur();" the control will lose focus when a key is unpressed, and that will trigger the onChange event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With