News

Getting the current PortalId outside of PortalModuleBase

It's occasionally tricky/troublesome to pass the current Portald from your DotNetNuke control that inherits PortalModuleBase so that it can be used in your business object logic. A trick that I learned looking at another developer's code recently is to get the current PortalId from PortalController.GetCurrentPortalSettings().PortalId. CurrentPortalSettings is set for every request, so it is always the value that you are looking for.

Hope it helps,

Ready to work with a team that delivers excellence?

Let’s make your vision a reality.

Contact Us →
© 1999-2025 Engage