DotNetNuke Daily Tip #9 7/18/06 Skin Object Using PortalModuleBase

After a long haitus over the past few weeks the DotNetNuke Daily Tips are back! 

Sometimes you want to put a skinobject in your DotNetNuke Skins that you need to act like a module. Inheriting from PortalModuleBase instead of SkinObjectBase. SkinObjects though don't get loaded like regular modules and due to that you may run into issues where you can't easily access the TabId of the existing page. Here's how to get that information easily.

Dim objPortalModule As PortalModuleBase = DotNetNuke.UI.Containers.Container.GetPortalModuleBase(Me)
thisTabId = objPortalModule.TabId

Put the above code in your skinobject code and you will now have a PortalModuleBase object that you can use to easily access some of the basic DNN properties you're used to using from PortalModuleBase.

The above is VB code, any self respecting C# developer should be able to figure out the appropriate C# code. If not, email me and I'll bill you at my hourly rate ;)

Stay tuned for another DotNetNuke Daily Tip coming tomorrow!

Posted from

Recent Comments

There are currently no comments. Be the first to make a comment.

Add Comment

Please add your comment by filling out the field(s) below. Your comment may need to be approved before it becomes visible.
Enter your first name for display with the comment
Enter your last name for display with the comment.
Enter your email address so that we may contact you if necessary. We will also use this for your Gravatar.
Enter the URL to your website. URLs may be removed from comments.
Enter your comment here.
If you can't type Human2 in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond is a father, husband, leader, developer and car guy. Chris has long specialized in ASP.NET and DotNetNuke development, so you will find a variety of topics here on the website. For more information check out the about me page.

If you are looking for DotNetNuke consulting please visit my business website at