=================================================show.ashx <%@ WebHandler Language="C#" Class="Handler" %> using System; using System.Web; using System.Data; using System.Configuration; using entsut.DAL; public class Handler : IHttpHandler { public void ProcessRequest(HttpContext context) { string json = ""; string STDBXID = context.Request["STDBXID"].ToString(); try { DataSet ds = Common.NoPager2("Std_BZQqustions", "10", "ID,QuestionDes,createTime,createUser,createUser_entID", "createTime Desc", "STDBXID='" + STDBXID + "' and Valided=1"); DataTable dt = ds.Tables[0]; int i = dt.Rows.Count; string[] talk = new string[i]; string Total = null; for (int j = 0; j <= i - 1; j++) { talk[j] = "
  • " + dt.Rows[j]["createUser"] + "(" + dt.Rows[j]["createTime"] + "):

    " + dt.Rows[j]["QuestionDes"] + "

  • "; Total = Total + talk[j]; } json = "{'Total':'" + Total + "'}"; context.Response.Write(json); } catch { context.Response.Write(json); } } public bool IsReusable { get { return false; } } } ===================================insert <%@ WebHandler Language="C#" Class="Handler" %> using System; using System.Web; using System.Data; using System.Configuration; using entsut.DAL; using entsut.Core; using System.Text.RegularExpressions; public class Handler : IHttpHandler { public void ProcessRequest(HttpContext context) { string json = ""; string STDBXID = context.Request["STDBXID"].ToString(); string Message = context.Request["Message"].ToString(); string UserID = context.Request["User"].ToString(); string ENTID = context.Request["ENTID"].ToString(); try { string Notice = Common.Insert2("Std_BZQqustions", "QuestionDes,createTime,createUser,createUser_entID,Valided,STDBXID", "'" + Message + "','" + DateTime.Now + "','" + UserID + "','" + ENTID + "',1,'" + STDBXID + "'"); json = "{'Notice':'" + Notice + "'}"; context.Response.Write(json); } catch { context.Response.Write(json); } } public bool IsReusable { get { return false; } } }