I'm trying to access a hyperlink
on my listview
. When the user logs in,
the hyperlink will show on my homepage. It doesn't show.
protected void lvtop6_ItemCommand(object sender, ListViewCommandEventArgs e)
{
ListView hlBuy = (ListView)lvtop6.FindControl("hlBuy");
if (User.Identity.IsAuthenticated==true)
{
hlBuy.Visible = true;
}
else
{
hlBuy.Visible = false;
}
}
Please somebody advise me to figure out what is wrong with my code behind