1.发送页面:
继承DotNetNuke.Entities.Modules.Communications.IModuleCommunicator
public event ModuleCommunicationEventHandler ModuleCommunication;
ModuleCommunicationEventArgs oArgs = new ModuleCommunicationEventArgs();
oArgs.Text = rootId; //传递值
oArgs.Sender = "Sender";
oArgs.Target = "me"; //传递标志
if (ModuleCommunication != null)
ModuleCommunication(this, oArgs);
oArgs.Text = rootId; //传递值
oArgs.Sender = "Sender";
oArgs.Target = "me"; //传递标志
if (ModuleCommunication != null)
ModuleCommunication(this, oArgs);
2.接收页面:
继承 DotNetNuke.Entities.Modules.Communications.IModuleListener
public void OnModuleCommunication(object s, ModuleCommunicationEventArgs e)
{
if (e.Target == "me")
{
//接收变化
Response.Write(e.Text);
}
}
{
if (e.Target == "me")
{
//接收变化
Response.Write(e.Text);
}
}
“光棍节快乐”! 呵呵。。。。