Hi,
Ive developed a module that displays information for a user per website basis. I've upgraded the module recently and its main function is to check the database to see if there is any data in the database. If it has got the data for that particular module it loads it in to its corresponding controls.
The problem i am facing is when i first add the module to a tab, there is no data in the database. At this point i want to insert default values. I have some sample code below can you tell me why i receive the critical error message below?
protected void Page_Load(object sender, EventArgs e)
{
RemoveModuleController oController = new RemoveModuleController();
RemoveModuleInfo oInfo = oController.GetAllEntries(this.ModuleId);
try
{
if (Null.IsNull(oInfo))
{
oInfo.ModuleId = this.ModuleId;
oInfo.Instructions = "No instructions for this module";
oInfo.PortalId = this.PortalId;
oInfo.TabId = this.TabId;
oInfo.PortalName = this.PortalSettings.PortalName;
oInfo.RequestedBy = this.UserInfo.DisplayName;
oInfo.RequestedDateTime = DateTime.Now;
oInfo.IsHidden = false;
oController.InsertNewInstructions(oInfo);
ModuleController.SynchronizeModule(this.ModuleId);
}
}
catch (Exception ex)
{
Exceptions.ProcessModuleLoadException(this, ex);
}
}
the error message i receive is.
Error: MasterModuleStart 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 ssm.Modules.RemoveModule.MasterRemoveModule.Page_Load(Object sender, EventArgs e)
can anyone help?