public void MqttMsgPublishReceived(object sender, MqttMsgPublishEventArgs e)
{
string ReceivedMessage = System.Text.ASCIIEncoding.ASCII.GetString(e.Message);
if (ReceivedMessage.Contains("M2MType IO"))
{
Session["msg"] = ReceivedMessage; // not storing data
}
}
行
Session["msg"] = ReceivedMessage;
没有将数据存储到msg
我不知道为什么会这样。请告诉我如何在事件函数中使用会话变量。