<%@ WebHandler Language="C#" Class="getCommandType" %> using System; using System.Web; using System.Web.SessionState; using System.Data; using System.Text; using System.Collections; using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Curtain.DataAccess; using DK.XuWei.WebMes; public class getCommandType : IHttpHandler, IReadOnlySessionState { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; using(IDataAccess conn = DataAccess.Create()) { JArray json= new JArray( new JObject(new JProperty("id","1"),new JProperty("text","Text")), new JObject(new JProperty("id","4"),new JProperty("text","StoredProcedure")) ); context.Response.Write(json.ToString()); } } public bool IsReusable { get { return false; } } }