Forum Discussion
smithme
Sep 21, 2021Brass Contributor
HOW TO: Hide web part when it's empty
I have a web part I wrote that I want to hide when there is no content in it (like the News web part). How do I do that?
shinypurple
Sep 22, 2021Copper Contributor
smithme There's usually an option to hide the web part if there's nothing to show. It's definitely on 'News', although maybe not on every web part.
smithme
Sep 22, 2021Brass Contributor
Sorry, I wasn't more clear. I am writing a custom webpart. I want it to take up zero vertical space on the page when it is empty. How do I programmatically, tell my webpart to display:none;