I have a table in cshtml which contain simple data and filled by jquery response by id in Th
I want to know how jquery can handle draw anchor href by using id th in my table with condition if object response not null
<table id="_tblwellcore" class="table table-vcenter card-table">
<thead class="table-success" style="background:white;">
<tr>
<th style="font-size: 80%; font-weight: 700;">No</th>
<th style="font-size: 80%; font-weight: 700;">Data</th>
</tr>
</thead>
<tr>
<td id="_no"></td>
<td id="_data"></td>
</tr>
</table>
function getdata() {
$.ajax({
cache: false,
type: 'GET',
url: '/Home/GetData',
data: { uwi: uwi },
contentType: 'application/json; charset=utf-8',
datatype: 'json',
success: function (response) {
$.each(response, function (i, obj) {
$(row).find("#_no").text(obj.no== null ? '-' : obj.no);
if(obj.data != null){
//draw anchor href
//ex : <a href="@Url.Action("ViewData", "Home",new{ filename = obj.no})" target="_blank"><i class="fa fa-eye" aria-hidden="true"></i></a>
}
}
}
})
}
i wish someone can help me. thanks