Skip to main content
 首页 » 编程设计

c#之模块通信在 DNN 中不起作用

2024年02月20日12webabcd

我正在使用 DNN6,我创建了两个模块并尝试使用模块通信器在它们之间进行连接,这是我的代码:

 
#region IntermoduleCommunication 
ModuleCommunicationEventArgs oArgs = new ModuleCommunicationEventArgs(); 
oArgs.Value = Session["ShoppingCart"]; 
if (ModuleCommunication != null) 
 ModuleCommunication(this, oArgs); 
#endregion 

但是我在 ModuleCommunication 变量中得到“null”?

请您参考如下方法:

您是否将模块包装在 DNN list 中的更新面板中(启用了支持部分渲染选项)?

如果我没记错的话,IMC 不会通过 UpdatePanels 工作。