Data table for Razor pages

miladel

Member
Joined
Aug 16, 2020
Messages
14
Programming Experience
Beginner
Dear All,
I need to add a data table to my razor project for getting data from SQL database using dapper. I have tried datatables.net but there is a problem in routing to the API controller, while I can redirect to the JSON data via browser, I can't catch any data in the data table. If you know a better option rather than datatables.net, please let me know. if datatables.net is the best choice, tell me to give more information about my issue.
thanks
 
I'm getting the impression that you are hoping for a WebForms like control where you just feed the control a DataSet or DataTable and that Data will just be rendered. Razor was designed and written mostly with that mindset that HTML is the developers' preferred mode of display, and not some abstract control. So that means it is up to you to write the Razor code that will render the HTML for your data.
 
Back
Top Bottom