126 Star 178 Fork 71

xrwang / xrwang.weixin.PublicAccount

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
ParseRequestMessage.aspx.cs 948 Bytes
Copy Edit Web IDE Raw Blame History
xrwang authored 2015-02-26 16:24 . 添加基础接口示例
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using xrwang.weixin.PublicAccount;
public partial class Example_ParseRequestMessage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnParse_Click(object sender, EventArgs e)
{
string message = txtMessage.Text;
if (string.IsNullOrWhiteSpace(message))
txtResult.Text = "消息为空。";
try
{
RequestBaseMessage msg = RequestMessageHelper.Parse(message);
txtResult.Text = msg != null ? msg.ToString() : "解析消息失败。";
}
catch (Exception ex)
{
txtResult.Text = string.Format("解析消息发生异常。\r\n源:{0}\r\n描述:{1}\r\n堆栈:{2}",
ex.Source, ex.Message, ex.StackTrace);
}
}
}

Comment ( 0 )

Sign in to post a comment

C#
1
https://git.oschina.net/xrwang2/xrwang.weixin.PublicAccount.git
git@git.oschina.net:xrwang2/xrwang.weixin.PublicAccount.git
xrwang2
xrwang.weixin.PublicAccount
xrwang.weixin.PublicAccount
master

Search