How to assign value to dropdown with ajax in asp.net mvc

Sep 29, 2019

Hi Sir, I need to load dropdown value returned in ajax success function to the page but every time it gets a null value.

currently, I am using the following method:

    $(document).ready(function () {
            url: '/PurchaseOrder/getDefaultCostCentreandDepartment',
            type: 'post',
            data: {
                'dummydata': 7
            success: function (r) {

            error: function (r) {

the above method is not working, please guide me through the way.

  1. No comment Available

Add Your Comment