I have a very large ASP.NET application in C#.
The issue is simple yet difficult/strange. No matter where in the code I try to change the visibility of the button, it retains its default value whether I set that to true or false.
I am not sure what could be causing this so I thought I might take a shot at asking for opinions here.
The
Visibleproperty inherits it’s state from parent controls.For example:
The
Buttonwill never be visible, as long as the container controlPanel1is invisible.Implementation of
Control.Visible:So when
parent != null && !visible, the child control is invisible.