标签:
var resultJson = new { records = rowCount, page = pageindex, //总页数=(总页数+页大小-1)/页大小 total = (rowCount + pagesize - 1) / pagesize,//总页数 rows = data.ToList<Web.Entity.Db.Table1Bean>(), }; //JsonResult jr = Json(resultJson, "application/json", System.Text.Encoding.UTF8, JsonRequestBehavior.AllowGet); //Newtonsoft.Json 把对象转换成json字符串 string json = Newtonsoft.Json.JsonConvert.SerializeObject(resultJson);
标签:
原文地址:http://www.cnblogs.com/webenh/p/5797825.html