Datatable Editor to work with webforms

Datatable Editor to work with webforms

dashyferdashyfer Posts: 7Questions: 1Answers: 0

I've been trying to post a question here all day long, still not approved.

In case someone has an answer here is the link to the question


  • kthorngrenkthorngren Posts: 7,742Questions: 25Answers: 1,719

    You are getting this error:

    Error: DataTables warning: table id=VacationCalendarTableUsingEditorNet - Ajax error. For more information about this error, please see

    The place to start is with the troubleshooting steps provided in the URL:

    Let us know what you find using those steps.


  • dashyferdashyfer Posts: 7Questions: 1Answers: 0

    Hello... thanks for your answer
    i did the troubleshoot and what i found is that i get a double ajax request as a response post.
    this is what i get
    instead of
    why is that?
    In my ajax option i only have a post call to get the datatable to load like in the Webforms/ ASPX example.
    What am i missing?

  • dashyferdashyfer Posts: 7Questions: 1Answers: 0

    Me again,
    I came to one conclusion and i might be wrong but i think Editor is not fit for webforms here is what i tried.

    in the Editor block i added:

    ajax: {
                        create: {
                            type: 'POST',
                            url: "<%= System.IO.Path.GetFileName(Request.Url.AbsolutePath) %>/CreateVacationCalendar"
                        edit: {
                            type: 'PUT',
                            url: "<%= System.IO.Path.GetFileName(Request.Url.AbsolutePath) %>/UpdateVacationCalendar"
                        remove: {
                            type: 'DELETE',
                            url: "<%= System.IO.Path.GetFileName(Request.Url.AbsolutePath) %>/DeleteVacationCalendar"

    in the Datatable block i changed the ajax call for a Get instead of a Post

    ajax: {
                        "url": "<%= System.IO.Path.GetFileName(Request.Url.AbsolutePath) %>/GetTableResultsUsingEditorNet",
                        "type": "GET",
                        "dataType": "json",
                        "contentType": "application/json; charset=utf-8"

    In the code behind(aspx.cs file) i did every method for those CRUD request and the only one working is the one to Get.

    [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
    public static void GetTableResultsUsingEditorNet()
       HERE THE CODE TO GET WHICH RETURN DATA. ITS THE SAME AS THE ONE IN THE[ Webforms/ ASPX example.]( " Webforms/ ASPX example.")

    For the create process i did the following

    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public static void CreateVacationCalendar()
      HERE THE CODE WHICH IS THE SAME AS THE GetTableResultsUsingEditorNet()

    This last is not even flagged in visual studio debug like the Get. The ajax response is empty.
    After this call the get call is done but return a 404 error with this response url :

    That is why i think the Editor is not working with WebForms because is looks like this last url is an mvs logic where the Controller is specified along with the the method name and parameters.

  • allanallan Posts: 51,260Questions: 1Answers: 7,721 Site admin

    If you "View source" on the generated HTML page, can you show me the Javascript that is created by ASP please? I'm wondering if you just need: url: '/<%...' to make it an absolute path rather than a relative one.


  • allanallan Posts: 51,260Questions: 1Answers: 7,721 Site admin

    Forgot to say that I've marked your account to bypass the spam filter. Not sure why it was being picked before.


  • dashyferdashyfer Posts: 7Questions: 1Answers: 0

    Hello Allan
    Everything happening here is after i clicked CREATE button

    Here is what i have when i use AbsolutePath
    Editor block:

    Datable block:

    XHR console:

    When i have a string path like "Team_VacationCalendar.aspx/CreateVacationCalendar"
    The Editor and Datatable block display the same in the view source but the XHR Console is different:

    But i still got an error that point me to

    I tried the resolution suggested here and got a TypeError: i is undefined. When i look for this error it always refer to an html problem but i am not sure i have one.
    Here is my table just in case:

  • allanallan Posts: 51,260Questions: 1Answers: 7,721 Site admin

    I don't actually see the Team_VacationCalendar.aspx/CreateVacationCalendar request in your screenshots. They both show for Get....

    Are you able to give me a link to your page so I can take a look please?


  • dashyferdashyfer Posts: 7Questions: 1Answers: 0

    Unfortunately i cannot give you a link because the dev is not publish yet and i need to make it work before plus we would really like to buy it for our solution

    The Team_VacationCalendar.aspx/CreateVacationCalendar is the first request on XHR screenshot. The response sent is an internal error as well.

    Please if you have any idea about the issue just point me where to look. Are there other people working with Editor on a WebForm project?

  • allanallan Posts: 51,260Questions: 1Answers: 7,721 Site admin

    Ah - sorry. I was looking at the bottom where the highlighted row is.

    The documentation we have for WebForms is available here.

    There is something about the relative URLs that is causing the issue here. Do you know the absolute URL that the requests should go to? And what's the URL that your page is loading (i.e. shown in your browser's location bar). From that we can see the mapping between them.

    Sorry I'm not able to give a simple answer - its difficult to know exactly what is going wrong without being able to see it.


Sign In or Register to comment.