protected override void OnPreRender(EventArgs e) { int id = 1; int.TryParse(this.Request.QueryString["id"], out id); int page = 1; int.TryParse(this.Request.QueryString["page"], out page); if (id <= 0) { id = 1; } if (page <= 0) { page = 1; } string callBack = this.Request.QueryString["callBack"]; if (string.IsNullOrEmpty(callBack)) { return; } string lstString = JSON2.Serialize(GalleryHelper.GetPagedCategory(id, page, false)); this.Response.Write(callBack + "(" + lstString + ")"); this.Response.ContentType = "application/json"; base.OnPreRender(e); }
protected List <Category> GetCategory(string ids, int page) { var categories = new List <Category>(); var idList = StringHelper.GetIntList(ids); foreach (var id in idList) { categories.Add(GalleryHelper.GetPagedCategory(id, page, true)); } return(categories); }
public Category Detail(int id, int page, string callback) { return(GalleryHelper.GetPagedCategory(id, false)); }