
可以通过一下代码:
using System.Collections.Generic;
using System.Web.Script.Serialization; SortedDictionary<string, object> values = new SortedDictionary<string, object>();
values.Add("list", _sb.ToString());
values.Add("currentpage", pageIndex);
values.Add("endflg", pageIndex == datas.TotalPages);
context.Response.Write(new JavaScriptSerializer().Serialize(values));