I have created a custom grid module MySQLGrid using Web Application Project, assembly file MySQLGrid.dll is in DNN bin folder. Alone it is working good. Now i want to use it within another module. I read somewhere that to use a module inside another module, we need to register it first.
So first i created a TestGrid.ascx module, then register MySQLGrid as below
<%@ Register TagPrefix="msg" Assembly="MySQLGrid" Namespace="Samtech.Dnn.Modules.MySQLGrid"%>
and create control on page as
<msg:View id="mygrid" runat="server" />
But when i install and test TestGrid module in DNN, it is showing following error
Error: Test Grid is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. —> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() — End of inner exception stack trace —
What is the correct way to re-use compiled module inside another?
Anyways problem has been resolved. I register module as
now it is working properly.
There was a problem in testgrid module that was preventing it from displaying.