Last post Jun 05, 2008 05:18 AM by ihsany
Jun 04, 2008 05:49 AM|raybiez|LINK
Let's say you have a custom control inheriting from System.Web.UI.Control of which you have overridden the Render method. Inside the ASPX you have entered like so:
<acme:CustomControl ID="myCtrl" runat="server" Visible="false" />
In the page's Page_Load method in the code behind (cs) you want to set the visibility to true if certain criteria is met:
this.myCtrl.Visible = true;The control is still not displayed, it seems like the Visible property is not set to true, but remains false.What am I doing wrong? Or is it a bug of the .NET framework
this.myCtrl.Visible = true;
The control is still not displayed, it seems like the Visible property is not set to true, but remains false.
What am I doing wrong? Or is it a bug of the .NET framework
Give credit where it is due, mark a post as an answer if it helped you.
Jun 05, 2008 05:18 AM|ihsany|LINK
do you have a property in your custom control class named Visible? if so, how did you declare it?
if not has a property named Visible, doesnt matter..Also System.Web.UI.Conrol namespace correspond it..
second one, how is your Render method?