Editor - inline - ASP.Net (aspx or asmx) server-side save processing example
Editor - inline - ASP.Net (aspx or asmx) server-side save processing example
getools
Posts: 6Questions: 1Answers: 0
Is there a place where we can see an example of an aspx or asmx file that works with an inline datatable editor?
The php example I found at https://editor.datatables.net/examples/advanced/REST.html seems to have all the important bits in an include file which we can't access.
This discussion has been closed.
Answers
Hi,
You can download a .NET distribution for Editor on the Editor download page. It contains all of the examples that are on the Editor site, but for .NET.
The HTML pages are static and the Ajax routes are provided by Web API with C#. All of the server-side code is included in that distribution.
Regards,
Allan
I need an example of an ASP.net server-side script that processes Editor commands.
I can't tell from the above answer if there is something available.
It unfortunately does sound like the answer meant to say "but NOT for .NET"
However, it seems like such a simple thing to include a dozen lines of code for an ASMX file and the Editor code to implement it, that I am hoping that an example is around somewhere.
Also, the .NET distribution is for an MVC implementation.
I'm working for a client that has ASP.Net.
So, if someone could take 20 minutes and put together and example, it would be very helpful.
Hi,
The download page has a button for a .NET package. It will download a Visual Studio package that contains all of the Editor examples. As I say, they are Web API based as that is very well suited for how Editor works, but you can also use the
DataTables.dll
library with an ASP.NET MVC controllers if you prefer, which is fully documented here.Regards,
Allan
The client doesn't use MVC, so we would like to see a very basic example of a call to a web service method. Ideally, a call to a .ASMX web service.
I assume all we need is the client-side jquery to send and receive a call to update data, and the .asmx or generic web service code that shows how to receive http post data and what it needs to return.
I assume that the client-side jquery would be almost identical to the example at
https://editor.datatables.net/examples/advanced/REST.html
Where we are stuck, is that the server-side section in that example is in php that doesn't make it obvious to an ASP.net person how to make a .asmx method to consume and send back a response to that client-side code.
Have you downloaded the Editor .NET package and tried to run that? All of the Editor examples that are available on the Editor site are included in that package and it can be run locally. Install instructions are available here.
Those examples use Web API to provide the web service.
Regards,
Allan
I will repeat...
The examples in the .Net environment are all in MVC.
The client is using ASP.Net.
Therefore, all the examples of passing data via controllers and views in MVC is as different to ASP.net as PHP.
We need an example of a call to a web service, so we can see how to form a method (parameters that method receives and how to reference it from the jquery) to process the underlying AJAX insert/update/delete calls, and to also see what we need to return from the method for these calls.
The examples are actually all Web API. I didn't include any MVC.NET examples directly since Web API fits a lot better with the way Editor operates.
To have the client-side all a web-service you just need to point the
ajax
option at the URL you are publishing your web-service to. The parameters that Editor sends, and those it expects in return are documented here. With that information you don't need to use the provided dll, you can have any web service that will operate with it, if it expects data in that format and returns the expected parameters.Regards,
Allan
@getools, Have you find an example?? I was struck here the same, I need a working example
Regards,
Phani43
Currently no, I don't have an example of Editor being used with an aspx page. That is something I'm going to write up in the near future.
Allan
hello.. is there a solution for the aspx page now ?
Yes, see the documentation here.
Allan