I have two controls a hyperlink and label.
For some reason, I can set the visbility of the hyperlink control onload but it doesn't work for a label control. I get....."label does not exist in the current context".
if (!Page.IsPostBack)
{
if (securityid == User.SECURITY_LEVEL_ID_AO_dec)
{
Hyperlink1.Visible = false;
Label1.Visible = false
//Get ERROR on label visiblity setting
}
}
Is it because the lable gets rendered elsewhere than the page load? If so where and which event?
Thanks.