问题描述
publicpartialclassgeneral_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){if(HttpContext.Current.Application["xmpp"]==null){MaikeArgXMPP();}if(Session["info"]!=null){info.Text=Session["info"].ToString();}}protectedvoidUnnamed1_Click(objectsender,EventArgse){SendMSM("123","nihao");}publicvoidMaikeArgXMPP(){//在应用程序启动时运行的代码agsXMPP.XmppClientConnectionxmpp=newagsXMPP.XmppClientConnection(ConfigHelper.GetConfigString("pushServer"));xmpp.Open("789","789");HttpContext.Current.Application["xmpp"]=xmpp;xmpp.OnLogin+=delegate(objecto){};xmpp.OnMessage+=newagsXMPP.protocol.client.MessageHandler(xmpp_OnMessage);}voidxmpp_OnMessage(objectsender,agsXMPP.protocol.client.Messagemsg){stringaa="";aa=msg.Body;if(!aa.Equals("")||aa!=string.Empty){//断点调试Session["info"]=aa;info.Text=aa;}}privatevoidOpenMsg(stringstrReMarkName){Session["info"]=strReMarkName;}publicvoidSendMSM(stringapnUserName,stringcontent){try{stringuserName=string.Format("{0}@{1}",apnUserName,ConfigHelper.GetConfigString("pushServer"));agsXMPP.XmppClientConnectionxmpp=(agsXMPP.XmppClientConnection)HttpContext.Current.Application["xmpp"];if(xmpp==null||xmpp.XmppConnectionState==XmppConnectionState.Disconnected){MaikeArgXMPP();}xmpp.Send(newagsXMPP.protocol.client.Message(userName,agsXMPP.protocol.client.MessageType.chat,content));}catch{}}publicvoidsis(stringname){info.Text=name;}protectedvoidUnnamed1_Click2(objectsender,EventArgse){Response.Redirect(Request.Url.ToString());}}
如以上代码我想在收到信息是界面上的info.test改变内容应该怎么操作上图的断点调试会发送
解决方案
解决方案二:
顶顶顶顶顶顶顶顶顶顶顶顶顶