wsyeager
Centurion
I have a usercontrol which I would like to make invisible based on a certain condition as follows:
Protected SchedulingAdminLogout As New YTCIWebUserControls.SchedulingAdminLogout
.
.
.
If DirectCast(ViewState.Item("PCREntry"), String) = "1" Then
SchedulingAdminLogout.Visible = False
End If
While debugging, it does go inside the IF statement (which I'm expecting), but the user control remains visible on the webform. How can I set the visibility to false based on this condition?
Protected SchedulingAdminLogout As New YTCIWebUserControls.SchedulingAdminLogout
.
.
.
If DirectCast(ViewState.Item("PCREntry"), String) = "1" Then
SchedulingAdminLogout.Visible = False
End If
While debugging, it does go inside the IF statement (which I'm expecting), but the user control remains visible on the webform. How can I set the visibility to false based on this condition?