protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Request["id"].ToString()); IList list = new InfoSource_second_Manager().GetInfoSource_SecondByBranchOneId(id); System.Text.StringBuilder sb = new System.Text.StringBuilder(); for (int i = 0; i < list.Count; i++) { string json = "{" + string.Format("id:'{0}',name:'{1}'", list[i].Id, list[i].SourceDetail) + "}"; sb.Append(json); if (i != list.Count - 1) sb.Append(","); } Response.Write("[" + sb.ToString() + "]"); }