Closed troncomputers closed 5 years ago
Thanks for contacting us, @troncomputers.
You should use a certain naming convention so the handler is hit.
Try to rename the handler to OnGetPageData
but leave the asp-page-handler="PageData"
.
OMG, yes. I'm sorry...
Is this a Bug or Feature request?:
Bug (I think)
Steps to reproduce (preferably a link to a GitHub repo with a repro project):
Just try to return json from page handler.
Index.cshtml.cs
Index.cshtml
Description of the problem:
Page handler returns html not json. I'm trying to use DataTables helper: LZorglub/DataTables.AspnetCore.Mvc
Version of
Microsoft.AspNetCore.Mvc
orMicrosoft.AspNetCore.App
orMicrosoft.AspNetCore.All
: 2.1