protected override void OnInit(EventArgs e) { string PostType = Request["PostType"]; if (string.IsNullOrEmpty(PostType)) { base.OnInit(e); return; } Common.Helper.mJsonResult json = new Common.Helper.mJsonResult(); switch (PostType) { case "getWechatImage": GetWechatImage(); //从微信服务器上获取图片 break; default: break; } if (json != null) { string retStr = json.ToJson(); Response.Write(retStr); Response.End(); } }
public void ProcessRequest(HttpContext context) { conn = context; string PostType = conn.Request["PostType"]; if (string.IsNullOrEmpty(PostType)) { json.success = false; json.msg = "无效参数"; conn.Response.Write(json.ToJson()); conn.Response.End(); } ExecPostType(PostType); if (json != null) { conn.Response.Write(json.ToJson()); conn.Response.End(); } }
protected override void OnInit(EventArgs e) { string PostType = Request["PostType"]; if (string.IsNullOrEmpty(PostType)) { base.OnInit(e); return; } Common.Helper.mJsonResult json = new Common.Helper.mJsonResult(); switch(PostType) { case "getWechatImage": GetWechatImage();//从微信服务器上获取图片 break; default: break; } if(json!=null) { string retStr = json.ToJson(); Response.Write(retStr); Response.End(); } }