bind all the other three dropdowns based on firstdropdown in cshtml
bind all the other three dropdowns based on firstdropdown in cshtml
This code is for binding 2 dropdowns based on the first dropdown. I want all the other three dropdowns to bind based on the first dropdown.
function ByCategory(e) {
$.ajax({
url: '/Admin/GetItems2',
type: "GET",
data: {
branchname: e
},
success: function(subserv) {
$('#BranchCategory_BranchCategory').html("");
$('#BranchCategory_BranchCategory').append($('<option></option>').val("0").html("--Select Category--"));
$.each(subserv, function(i, obj) {
$('#BranchCategory_BranchCategory').append(
$('<option></option>').val(obj.BranchCategory).html(obj.BranchCategory));
});
}
});
}
there are 1000s of questions on here about implementing cascading dropdowns (i.e. dropdowns whose values depend on the value of another dropdown). Did you search or try anything?
– ADyson
Jun 29 at 9:03
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Please post your HTML code as well.
– Ravi Maniyar
Jun 29 at 8:35