It would be worth reading over how to Ajax source data in .NET and also the DataTables Ajax page.
The above code appears to be attempting to get the data from the database in C# and then just assigning it into javascript. In fact what is happening is that you are assigning $('#json') to ajax where $() returns a jQuery object.
I'd suggest looking into Web API with .NET as that works really nicely with Ajax.
Answers
It would be worth reading over how to Ajax source data in .NET and also the DataTables Ajax page.
The above code appears to be attempting to get the data from the database in C# and then just assigning it into javascript. In fact what is happening is that you are assigning
$('#json')
toajax
where$()
returns a jQuery object.I'd suggest looking into Web API with .NET as that works really nicely with Ajax.
Allan