Datatables with Razor Pages
Datatables with Razor Pages

Howdy folks!
My company is considering to move over from MVC to Core 2.1 Razor Pages, I have been tasked to see if there will be any hick ups during this transition. We've made use of Datatables in previous applications however I cannot find anything with regards to how to get it to work with Razor pages? Can someone please point me in the right direction?
Many Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Ah nevermind, I got it to work.
Eh, how?
Particularly, I'm trying to find some examples of DataTables editor used with ASP.Net Core Razor Pages...
There's a quite a few pages discussing this if you do a web search, such as this and this. Hopefully they'll help,
Cheers,
Colin
Thank you Colin, I've read every article matching +datatables +asp.net +core, 13 times over and can't get anywhere. Most of the examples are utilizing either ApiController (which no longer exists in ASP.NET Core), or DataTables (without the Editor). We're attempting to get this working on Razor Pages so we can continue migrating our WebForms pages to Asp.Net Core / Razor Pages.
Full MVC seemed a bit overkill/messy for us (it's a relatively small app) so the new RazorPages Syntax and smaller application footprint seems to suite our needs well. This is what we've got handling the response to the DataTables Editor code (which is also copied from our MVC App with an update to the URL string:
[HttpGet]
Our URL String in HTML is set to:
/QuoteEdit?handler=ReturnQuoteItems&QuoteID=" + getUrlVars()["QuoteID"]
If there's a better way to do this, I'd love some direction as to what we're doing wrong. Ideally we'd like to use the EF DbContext vs calling a separate DBConnection but couldn't find any good examples with that and DataTables Editor either.
I asked this question in a new post so it can hopefully help others as ours is specific to DataTables Editor w/ASP.NET Core / Razor Pages. For whatever reason, it doesn't give us the option to post in the Editor forum.
In the "Controllers" section at the bottom of this page it shows how to use .NET Core controllers. The .NET Core download package for Editor also includes a full set of examples for .NET Core, including their controllers.
Editor uses a direct ADO.NET connection rather than EF I'm afraid.
Allan
hi team and @Stormchaser,
I was using this datatables from 2018. now I have to work on asp.net razor pages.
and the response data is too large, so I decided to use serverside rendering.
the issue is that I'm not able to make it work. I get no help from google or any other articles.
I need some help from you guys to implement datatable server-side rendering using asp.net core razor pages.
kindly help ..
thanks in advance,
kamal.