I have a mvc.net project which works great.
I use this project as a filter that gets data, filters it and sends back a JSON.
Example of a calls made to this project could be like :
public ActionResult GetSomeData( )
{
var data = new List<HelloWorld> ();
TempData["imageData"] = data; // get data, filter it and send back part of it and save the rest in "TEMPDATA"
var retunrdtd = new {Success = "hello world"};
return new JsonResult {Data = filteredData, JsonRequestBehavior = JsonRequestBehavior.AllowGet};
}
I filter the data since the amount of data can be large so i send back lets say 100 listitems instead of all 10000. if i want a 100 more i call a method that checks if the tempdata exists and takes the remaining 9900 from tempdata and gives me another 100 etc.
Im thinking of creating a seperate web api that will be on another domain. I would like to call the methods that I have in my current project, example:
www.myFilterMvcDotNet.com/home/GetSomeData
But im not sure if the tempdata will hold any value once I got the first 100 listitems. So my question is simple, will it? if not what is the best way to keep track of data recived and remaining data?