zoukankan      html  css  js  c++  java
  • dnn中模块间的通讯机制

    做个简单的记录:

    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);

    2.接收页面:
    继承 DotNetNuke.Entities.Modules.Communications.IModuleListener
     public void OnModuleCommunication(object s, ModuleCommunicationEventArgs e)
    {
        
    if (e.Target == "me")
        {
            
    //接收变化
           Response.Write(e.Text);
         }
    }

    “光棍节快乐”! 呵呵。。。。

  • 相关阅读:
    ACM学习
    吴翼大神
    心急的C小加(两种解法)
    万圣节派对(水题)
    poj 1163 The Triangle
    POJ 1088滑雪
    1690 开关灯
    908. 校园网
    STL之stack栈
    1163 访问艺术馆
  • 原文地址:https://www.cnblogs.com/ajaxleoxu/p/955868.html
Copyright © 2011-2022 走看看