public ActionResult LoadWatch() { var draw = Request.Form.GetValues("draw").FirstOrDefault(); var start = Request.Form.GetValues("start").FirstOrDefault(); var length = Request.Form.GetValues("length").FirstOrDefault(); //Request.Form.GetValues("order[0][column]").FirstOrDefault(): get column index that used for sorting //columns[index][name]:get column name to used in orderBy LINQ statement string sortColumnDirection = Request.Form.GetValues("order[0][dir]").FirstOrDefault(); var searchValue = Request.Form.GetValues("search[value]").FirstOrDefault(); //Paging Size (5, 10,20,50,100) int pageSize = length != null?Convert.ToInt32(length) : 0; int skip = start != null?Convert.ToInt32(start) : 0; int recordsTotal = 0; // Getting all Account data //Paging var data = watchService.LoadWatchList(sortColumnDirection, searchValue, ref recordsTotal, skip, pageSize); return(Json(new { draw = draw, recordsFiltered = recordsTotal, recordsTotal = recordsTotal, data = data })); }