Ajax Call to Controller

Last Reply 6 days ago By dharmendr

Posted 6 days ago

Hi team,

I using the MVC Application and i am calling controller through ajax call after loading the page. but when i am calling method from controller through ajax it taking more than 2 mins to hit the controller breakpoint, can any one tell what is the problem.

This is the code i am using for calling controller via AJAX.

$("#txtACTUALVALUE").change(function () {
    var ActualValue = $(this).val();
    var Currency = document.getElementById('drpCurrency').value;
    $.ajax({
        type: "GET",
        url: "/ProjectCreation/ValueinUSD",
        data: { ActualValue: ActualValue, Currency: Currency },
        dataType: "json",
        contentType: "application/json; charset=utf-8",
        success: function (data) {
            document.getElementById('lblValueinUSD').innerText = data;
        }
    });
});

Thanks in advance.

You are viewing reply posted by: dharmendr 6 days ago.
Posted 6 days ago

Hi malar,

Use F12 Developer Tools Network Capture to diagnose network-related issues.

You can see the relative timing that each item on a webpage takes to load and render, so you can quickly see and solve problems.

Reference

Ajax Call from JS to Controller is too slow