ALMMa / datatables.aspnet

Microsoft AspNet bindings and automatic parsing for jQuery DataTables along with extension methods to help on data queries.
MIT License
303 stars 136 forks source link

request null when using asp.net webform with webapi #46

Open sgashua opened 7 years ago

sgashua commented 7 years ago

I created project that uses webform with webapi. I copied your webapi sample. when page loads, webapi function is called but request is null. how to solve?

ALMMa commented 7 years ago

Seems that there's a problem with the request itself. Might be missing something. Can you copy/paste it's content here? Please, consider using Fiddler to catch the request content.

sgashua commented 7 years ago

webapi.txt

request is null in this function public JsonResult Get(IDataTablesRequest request)

jdevx commented 7 years ago

I had this problem because I forgot to register the data table configuration in the global asax. @sgtagan, make sure you add the following code to your global: GlobalConfiguration.Configuration.RegisterDataTables();

jase-ek commented 2 years ago

Even after adding the global configuration to global.asax it still does not work. I am using autofac is there a way to setup datatables on that? I am getting request as null