Hello,
I am creating my first module with DotNetNuke 4.8.0 Starter Kit and C#. Its name is "MMNoticias", The first screen works fine. I have add a
new user control called "Categorias.ascx". This is how I call it from ViewMMNoticias.ascx.cs:
ModuleController objModules = new ModuleController();
Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "Categorias", "mid=" + ModuleId.ToString()));
Things don't work out well when the other user control is called by the code above after I clicked on a LinkButton.
I get differents error messages according my login type:
-If am logged as host:
Error: Cadastro de Categorias is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unable to cast object of type 'ASP.desktopmodules_mmnoticias_categorias_ascx' to type
'DotNetNuke.Entities.Modules.PortalModuleBase'. ---> System.InvalidCastException: Unable to cast object of type
'ASP.desktopmodules_mmnoticias_categorias_ascx' to type 'DotNetNuke.Entities.Modules.PortalModuleBase'. at
DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack
trace ---
-If am logged as Administrartor:
An error has occurred.
Error: Cadastro de Categorias is currently unavailable.
If I am anonyms:
Module Load Warning
One or more of the modules on this page did not load. This may be temporary. Please refresh the page (click F5 in most browsers). If the
problem persists, please let the Site Administrator know.
I don´t know why it doesn't works out well. What is the problem?
Thanks in advance,
Kau.
ps: MM Noticias = MM News; Categorias = Categories; Cadastro de Categorias = Categories Cadastre;