public static void ResponseJsonWithTotal(HttpResponse Response, DataTable dt, long rows) { Response.ContentType = "application/json"; string ret = "{\"total\":"; ret += rows.ToString(); ret += ",\"mode\":"; ret += DatatableToJson.Dtb2Json(dt); ret += "}"; Response.Write(ret);////这个很关键,否则error Response.End(); }
public static void ResponseJson(HttpResponse Response, DataTable back, int pageIndex, int pageSize, int start) { Response.ContentType = "application/json"; Response.Write(DatatableToJson.Dtb2Json(back, pageIndex, pageSize, start));////这个很关键,否则error Response.End(); }
public static void ResponseJson(HttpResponse Response, DataTable back) { Response.ContentType = "application/json"; Response.Write(DatatableToJson.Dtb2Json(back));////这个很关键,否则error Response.End(); }