Will "the Mighty" Strohl

HOW TO: Programmatically Hide Container/Module in DotNetNuke®

Many of you might already know this, but I just caught on to it this weekend.  I have not been about to find a way to hide the entire container programmatically when a business case asks for it.  However, the way I found to do it was built in to the DotNetNuke® framework. 

I do not remember it being there before, so I can only hope I was not blind before and it is new.  :)

Anyhow, the coveted line of code to programatically hide the container, and in turn the entire module is this:

Me.ContainerControl.Visible = False

I have successfully tested and used this line of code in DNN v4.09.00 module development.  I have only tested using it in the Page_Load event so far.



blog comments powered by Disqus

Affiliate Disclosure: Some of the links on this site may be affiliate links. This means, at no additional cost to you, I may earn a commission if you click through and make a purchase. All editorial content is not influenced by partnerships. I only recommend products and services I genuinely believe in.

© Copyright 2004-2025 by Will Strohl | Site design by Ralph Williams | Hosting Provided by Applied Innovations | DNN Development & Consulting | | Login