Print Page | Close Window

Hiding a control

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=2873
Printed Date: 28 March 2026 at 4:08am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Hiding a control
Posted By: CountAnton
Subject: Hiding a control
Date Posted: 20 May 2003 at 8:58am

I have a templated databound custom control, and it works great.  Except for one little detail.  When there is no data it still displays.

Basically the control is called 'MenuSection' and consists of a Title and Items.  The Items display the databound links, and so are empty when there is no data.  The title just always displays.

But I don't want the title to display if the control contains no items.

I've tried this.Visible

I've tried overriding the Render() method.

I've tried overriding the RenderControl() method.

But nothing I've done so far seems to work...



-------------
Anton Channing
http://www.kiamagic.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net