예제 #1
0
 public void ProcessRequest(HttpContext context)
 {
     this.context = context;
     context.Response.ContentType = "text/plain";
     if (this.context.Request.HttpMethod == "POST")
     {
         string jsonTemplateMsg       = getPostData();
         IWeiXinAdvertService service = new WeiXinAdvertService();
         service.SendTxtMessage(jsonTemplateMsg);
         return;
     }
     else
     {
         context.Response.Write("Hello World");
     }
 }
예제 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            IWeiXinAdvertService service = new WeiXinAdvertService();

            service.SendTxtMessage(TextBox2.Text, TextBox1.Text);
        }