Js dynamically adds a drop down box data source to the textbox
- 2020-03-30 02:42:25
- OfStack
$("#<%=lstCarBrand.ClientID%>").change(function () {
$("#<%=txtCarSeries.ClientID%>").val("");//Clear text box
$("#<%=txtCarSeries.ClientID%>").unautocomplete();//Clear autocomplete
$("#<%=txtCarSeries.ClientID%>").autocomplete('Ajax/AjaxCusCarEssentialVersion.aspx', {//Add the autocomplete
width: 200,
multiple: false,
matchContains: true,
extraParams: {//Passed parameter
"CarBrand": function () {
return $("#<%=lstCarBrand.ClientID%>").val();
}
}
});
});