private void GetName() { string txt_number = context.Request.Form["typeid"]; List <Model.occu_infor> list = fmoc.GetModelListNamecard("(occ_name like '%" + txt_number + "%' or card_no like '%" + txt_number + "%') group by occ_name,card_no "); if (list.Count > 0) { JavaScriptSerializer js = new JavaScriptSerializer(); string str = js.Serialize(list); string finalStr = "{data:" + str + "}"; context.Response.Write(finalStr); } else { context.Response.Write("err"); } }