I have created Multiple view module.
By taking two instances same module on same page I want to communicate between these two module instances.
I have also implemented IModuleCommunicator and IModuleListener
public partial class View_1 : PortalModuleBase, IModuleCommunicator
{
public event ModuleCommunicationEventHandler ModuleCommunication; protected void Search_OnClick(object sender, EventArgs e)
{
ModuleCommunicationEventArgs args = new ModuleCommunicationEventArgs();
args.Sender = "Products";
args.Target = "Products";
args.Text = "text";
args.Type = "type";
args.Value = searchParams;
if (ModuleCommunication != null)
{
ModuleCommunication(this, args);
}
}
IModuleListener .............
public partial class View_2 : PortalModuleBase, IModuleListener
{
public void OnModuleCommunication(object senderObject, ModuleCommunicationEventArgs eventArgs)
{
txtTest.Text = eventArgs.Text;
}
}
But I am getting ModuleCommunication event as null and unable to call OnModuleCommunication()
Thanx in advance