Right now i’m using asp.net core mvc than using datatable for displaying data. I’ve an Edit action button when cliked it redirect to another page, what i want to ask is if there is a better way than the one I’m using now.
"render": function (data) {
return `<div class="text-center">
<a onclick='Edit("/Admin/Category/Upsert/${data}")'
class="btn btn-success text-white" style="cursor:pointer">
<i class="fas fa-edit"></i>
</a></div>';
And for the javascript
function Edit(data) {
window.location.href = data;}