Container Creation
Last Post 08/11/2012 1:02 AM by ayani g. 0 Replies.
Author Messages Not Resolved
ayani g
Nuke Newbie
Nuke Newbie
Posts:1


--
08/11/2012 1:02 AM  
Thanks for your quick reply Joseph.

I want to do it for the below purposes.

1. I want to access the title ( in the resource file of the module) from the container, and add it to the container header.
2. When the user click on the container titale, he should be able to navigate to another page. This page locations are different from module to module. So inorder to get the module title, I should again access the module through the container and get the path, and add it as the navigation path of the container, once the user click on the title.

It would be great if you can reply me soon, since this is bit urgent.

Thanks in advance.

.....................................................................................................

2012-07-31 10:55 PM

1. Yes (I think).

2. Modules are meant to inherit PortalModuleBase. The container should be independent of the module it contains.

If you can explain why you need the container to inherit from PortalModuleBase, I may be able to help more. Also, what are you doing in the codebehind of the module? And, why?

.....................................................................................................

2012-07-30 06:34 AM
I was trying to apply a container which was created using C# into a module. I'm using DNN 6.2.0. This is a web application which is been inherited by SkinObjectBase class.

Once the page is loaded, I'm getting the below error.

Could Not Load Container: /Portals/_default/Containers/Test/TestContainer.ascx DotNetNuke.Services.Exceptions.ModuleLoadException: Unhandled error loading module. ---> System.InvalidCastException: Unable to cast object of type 'ASP.portals__default_containers_test_testcontainer_ascx' to type 'DotNetNuke.UI.Containers.Container'. at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Skins.Pane.LoadContainerByPath(String containerPath) --- End of inner exception stack trace ---

When I change the SkinObjectBase class to DotNetNuke.UI.Containers class, then it works fine. But inside the container, I was trying to get the module using DotNetNuke.UI.Containers.Container.GetPortalModuleBase(this); And since this is DNN 6.2.0, it says this method has been obsolete and try to use ModuleControl. But if I use that I cant get a PortalModuleBase object.

Can some one please help me on this. My basic questions are:

1. When implementing a container, using C# is it correct to inherit it from the DotNetNuke.UI.Containers class?

2. How can I access the PortalModuleBase object inside a container.

Thanks in advance.



---