<script type="text/javascript">
$(document).ready(function() {
$.ajax({
// url: 'FirmDetailService.asmx/GetFirmDetails',
url: '<%= ResolveUrl("FirmDetailService.asmx/GetFirmDetails")%>',
method: 'post',
dataType: 'json',
success: function (data) {
$('#example').DataTable({
//paging:false,
//ordering : false,
searchHighlight: true,
lengthChange:false ,
data: data,
'columns': [
{ 'data':'PID', 'visible' : false},
{'data' : 'PersonName',
'render': function (data, type, row, meta) {
var id = row['PID'];
return '<a href="FirmsDeatils.aspx?=' + id + '">' + data + '</a>';
}
},
{ 'data': 'CID', 'visible' :false },
{ 'data': 'CompanyName'},
{ 'data': 'City' },
{ 'data': 'Country' },
]
}
);
}
});
}
);
</script>
<body>
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>PID</th>
<th>PersonName</th>
<th>CID</th>
<th>CompanyName</th>
<th>City</th>
<th>Country</th>
</tr>
</thead>
</table>
</body>
</html>
こんにちはGyrocode.com:
–