Editor - inline - ASP.Net (aspx or asmx) server-side save processing example

Editor - inline - ASP.Net (aspx or asmx) server-side save processing example

getoolsgetools 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.

Answers

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    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

  • getoolsgetools Posts: 6Questions: 1Answers: 0

    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.

  • getoolsgetools Posts: 6Questions: 1Answers: 0

    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.

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    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

  • getoolsgetools Posts: 6Questions: 1Answers: 0

    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.

  • getoolsgetools Posts: 6Questions: 1Answers: 0

    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.

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    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

  • getoolsgetools Posts: 6Questions: 1Answers: 0

    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.

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    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

  • phani43phani43 Posts: 1Questions: 0Answers: 0

    @getools, Have you find an example?? I was struck here the same, I need a working example

    Regards,
    Phani43

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    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

  • ShambalaSreghShambalaSregh Posts: 1Questions: 0Answers: 0

    hello.. is there a solution for the aspx page now ?

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    Yes, see the documentation here.

    Allan

This discussion has been closed.