I have a cascade select
- >--Select Asset Location--
- class="form-control border-warning selectpicker" asp-items="@(new SelectList(string.Empty, "WOAId", "AssetID", "AssetName"))" OnChange="func2()">
- >--Select Asset--
- $("#Location").on("change", function () {
- var categoryId = $(this).val();
- $("#Asset").empty();
- $("#Asset").append("");
- $.getJSON(`?handler=Asset&id=${categoryId}`, (data) => {
- $.each(data, function (i, item) {
- $("#Asset").append(``);
- });
- });
- });
- $('#Location').selectpicker({
- liveSearch: true
- });
- $('#Asset').selectpicker({
- liveSearch: true
- });


Sachin SinghPosted Jan 25, 2021, 3:08 PM
now i got the issue , after filling data you are not refreshing the select . change it as follow.
Marius VasilePosted Jan 25, 2021, 3:35 PM