<script> $(document).ready(function () { $.ajax( { type: 'GET', dataType: 'json', contentType: 'application/json;charset=utf-8', url: 'http://localhost:53499/api/Values', success: function (data) { //alert(URL) try { debugger; var html = '<table> <thead> <th>Mail ID</th> <th>Subscription ID</th> <th> Subscription Date </th> </thead><tbody>'; $.each(data, function (key, val) { debugger; html += '<tr><td>' + '<a ' + 'href="mailto:' + val.MailID + '">' + val.MailID + '</a>' + '</td><td>' + val.SubscriberID +'</td><td>' + val.SubscribedDate + '</td></tr>'; }); html += '</tbody></table>'; $('#myGrid').html(html); } catch (e) { console.log('Error while formatting the data : ' + e.message) } }, error: function (xhrequest, error, thrownError) { console.log('Error while ajax call: ' + error) } } ); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)