Here is a snippet of the code that I am working with: (btnEditTop is a System.Web.UI.WebControls.Button)
if( userCanEdit )
{
this.btnEditTop.Visible = true;
}
When I’m stepping through the code with the debugger. At the start of the if statement, in the watch window, the value of Visible is false. As I step into the if, and after the = true statement, the value of Visible is still false.
This code is in a function that does work it some situations, but not in one case.
There must be something that I am doing that prevents Visible from being set.
Does anyone know what conditions will cause this?
Is it within a container that’s also invisible, a div perhaps or a Panel?