Ramon Ortega

Ramon Ortega

  • NA
  • 37
  • 2.5k

I can not return an image file and show it in View using Ajax in ASP

Feb 8 2022 5:47 PM

I can not return an image file and show it in View using Ajax in ASP MVC 

my ajax code:

DTR.SetUserData = function () {
    $.ajax({
        url: "/Modules/FetchUserData",
        type: "GET",
        data: {
            username: username
        },
        dataType: "json",
        success: function (data) {
            for (var i in data) {
                $('#iDNumber').val(data[i].employeeIdNo);
                $('#employeeName').val(data[i].employeeName);
                $('#employeePosition').val(data[i].positionName);
                $('#employeeDepartment').val(data[i].departmentName);
                $('#timeIN').val(data[i].inTimeTransLog);
                $('#timeOUT').val(data[i].outTimeTransLog);
               
            }
        }
    });
}


Answers (2)