servicestack, restful access, loads data twice at page load

servicestack, restful access, loads data twice at page load

FredFlintstoneFredFlintstone Posts: 24Questions: 0Answers: 0
edited January 2013 in General
hi - i've noticed that my server code is called twice when implementing an ajax call to a restful service, during the initial load of a page of paged data.

the reason seems to be that the code is called when the user clicks the link to the page. this runs the server code. but, once the page is loaded, my jquery then kicks in and makes the ajax call to go get the data (a second time!). am i doing something silly here? missing something? i noticed the iDeferLoading parm but it seems to require the first page of data (along with the total number of rows) hardcoded into the page? how would that be possible?

Replies

  • FredFlintstoneFredFlintstone Posts: 24Questions: 0Answers: 0
    actually, i suspect this is more of a c#/server-side thing than a datatables thing. just trying to get used to the datatables request event cycle :)
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Are you able to link us to a test page? With server-side processing enabled, DataTables itself should only be making a single request on first load.

    Allan
This discussion has been closed.