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);
}
}
});
}