if ( cond ) { lblX.Visible = true; } hypY.Visible = ! lblX.Visible;When the page runs sure enough lblX is visible, but hypY stays visible. If I step through the code even after the execution of the lblX.Visible = true; the debugger shows the property value to still be false. I have to resort to this sort of hack code
bool bHack = false; if ( cond ) { lblX.Visible = true; bHack = true; } hypY.Visible = ! bHack;Why do I have to use an alternate variable? Why can't I get the accurate visibilty of lblX in order to control hypY's visibility?