tags:

views:

153

answers:

2

Ok, I have a usercontrol on my page.

On the page, the visible property is set to false.

On the OnPreRender event, I set the visible property to true.

It runs the line of code, but does not actually change anything. (so visible remains at false)

This exact same method works across every other control, and there is nothing special about this control.

Any ideas??

+8  A: 

Check for the visible property on any controls containing this control.

Setting Visible=True does not mean that Visible==True, it will still return False if a parent control is False.

Other than that though, you may need to post some examples of your code in order for anyone to help track down what the problem may be.

Robin Day
What an idiot I am. I did know that, but forgot to check.Thanks very much - this has sorted it. (the parent control was the bit hiding it, as suggested)
tim
A: 

Visibility of container may be a cause

Tappu