Answers for "cascading dropdown in asp.net using ajax"

C#
0

cascading dropdown in asp.net using ajax

$("#categoryDropDownList").change(function (e) {
    $.ajax({
        type: "POST",
        url: "index.aspx/bindproduct",
        contentType: "application/json; charset=utf-8",
        data: '{"categoryId":"' + $(this).val() + '"}',
        dataType: "json",
        success: function (result, status, xhr) {
            $("#productDropDownList").html(result.d);
        },
        error: function (xhr, status, error) {
            alert("Result: " + status + " " + error + " " + xhr.status + " " + xhr.statusText)
        }
    });
});
  
$(document).ajaxStart(function () {
    $("img").show();
});
  
$(document).ajaxStop(function () {
    $("img").hide();
});
Posted by: Guest on March-09-2021

Code answers related to "cascading dropdown in asp.net using ajax"

C# Answers by Framework

Browse Popular Code Answers by Language