Adding Id to url from hyperlink
Adding Id to url from hyperlink
Holmes_Mor
Posts: 1Questions: 1Answers: 0
Hi I have the following code where i am trying to add the id which is the hyperlink to the end of my url.
// DataTable
var table = $('#dataTable').DataTable({
dom: 'lBfrtip',
buttons: [
{ extend: 'csvFlash', text: 'Download' }
],
columnDefs: [
{
targets: 1,
render: function (data, type, row, meta) {
if (type === 'display') {
data = '<a href="@Url.Action("action", "controller")?=' + data + '">"' + data + '"</a>';
}
return data;
}
}
]
});
The code above works but the ID is in a string and i need it in an int. I can't for the life of me see where i've gone wrong, i know it is an easy fix but i can't see it
This discussion has been closed.
Answers
Great
i Changed this line
to this
and it worked. I Knew it was something simple