After I select a value from a combobox in the page, it does not return on the server side.
<asp:DropDownList ID="dllTest" runat="server" AutoPostBack="true" OnSelectedIndexChanged="dllTest_SelectedIndexChanged">
I am making the dropdownlist to a combobox
$("#<%=dllTest.ClientID%>").combobox();
Also I want to trigger the ddlTest_SelectedIndexChange.
I tried doing this $('#dllTest').combobox();
and adding a property of the dropdown to ClientIDMode="Static"
not working.
What I want is after I select a value from the combobox, the selectedindexchange will fire in code behind
You need to use select function of combo-box as as follows. Because when you use combo box it hide you drop-down list.
select: function (event, ui) {
ui.item.option.selected = true;
self._trigger("selected", event, {
item: ui.item.option
}
);
__doPostBack('<%= dllTest.UniqueID %>', '');
},
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.