<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>test</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Literal ID="lt_msg" runat="server" ></asp:Literal>
</div>
</form>
</body>
</html>
</div>
namespace guotaotao_weixin
{
public partial class cm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
weixin wx = new weixin();
//lt_msg.Text = wx.GetAccessToken();
lt_msg.Text = wx.DelMenu();
lt_msg.Text += wx.SetMenu();
}
}
}
}
</div>
namespace guotaotao_weixin
{
public class guotaotao
{
private string _content = "";
private string _FromUserName = "";
public int msgType = 0;
public int isFirst = 0;
public int pid = 0;
#region "构造函数"
public guotaotao()
{
}
public guotaotao(string content)
{
this._content = content;
}
public guotaotao(string content,string FromUserName)
{
this._content = content;
this._FromUserName = FromUserName;
}
#endregion
public string createMenuDate()
{
string postData = "{" + "\r\n";
postData += "\"button\":[ " + "\r\n";
postData += "{ " + "\r\n";
postData += "\"name\":\"产品\"," + "\r\n";
postData += "\"sub_button\":[" + "\r\n";
postData += "{ " + "\r\n";
postData += " \"type\":\"click\"," + "\r\n";
postData += " \"name\":\"无糖系列\", " + "\r\n";
postData += " \"key\":\"gtt_menu_001001\"" + "\r\n";
postData += "}," + "\r\n";
postData += "{ " + "\r\n";
&