Error – Unload event listeners are deprecated and will be removed
Task is to load data in thirdparty datatable in .net core application. The implementation steps are given in the datatables.net portal, I used the same in the application, but while executing it throws an error “Unload event listeners are deprecated and will be removed” and data is not loading. Need help on this issue.
Below are the code which I used,
Code snippet:
[HttpGet]
public IActionResult GetAll()
{
List<Product> objProductList = _unitOfWork.Product.GetAll(includeProperties: "Category").ToList();
return Json(objProductList);
}
below is the ajax call:
$(document).ready(function () {
LoadDataTable();
});
function LoadDataTable() {
dataTable = $("#tblData").DataTable({
"ajax": {
"URL": "/admin/product/getall",
"type":"get"
},
"columns": [
{ "data": "title", "width": '15%' },
{ "data": "isbn", "width": '15%' },
{ "data": "listPrice", "width": '15%' },
{ "data": "author", "width": '15%' },
{ "data": "category.name", "width": '15%' }
]
});
}
View:
<table id="tblData" class="table table-bordered table-striped py-2">
When I am trying to run the application, browser shows the attached errors.[enter image description here](https://i.sstatic.net/JpHtB912.jpg)
Tamilarasan Jayaraman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.