ASP.NET MVC + Datatables ... 2 round trips

ASP.NET MVC + Datatables ... 2 round trips

ssikossiko Posts: 2Questions: 1Answers: 0

I am looking for a way to resolve an issue that came up while load testing pages all using datatables and ASP.NET MVC. Upon load of a page (e.g. GET /Index) we load a datatable (server-side) in document.ready against a route in the same controller (e.g. GET /Data).

When dealing with high concurrency these 2 calls are unnecessary the first time a user lands on a page. This scenario is common for us, user loads page w/ datatable on it and clicks on something in the first page, linking to another page.

You CAN pass raw JSON into Javascript from MVC Razor code. Is it easy for each page in my sample to not double call when "GET /Index" is called, and just land with the JSON it needs? Then behave as a regular data table against the 'GET /Data' route moving forward?

-Steve

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.