On my site master page I have navigation code that has links that I want to restrict visibility for. Here is the HTML to the point where I am having issues:
<%@ Master Language="C#" AutoEventWireup="True" CodeBehind="Site.master.cs" Inherits="MAMOnline.Site" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>MAMOnline - <%: Page.Title %></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="Stylesheets" runat="server">
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
<link rel="stylesheet" href="/css/styles.css" type="text/css" />
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server">
<Scripts>
<%--Framework Scripts--%>
<asp:ScriptReference Name="jquery" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
<div id="container">
<header>
<div class="width">
<h1><a href="/">MAM<strong>Online</strong></a></h1>
<nav>
<ul class="sf-menu dropdown">
<asp:LoginView runat="server" ViewStateMode="Disabled">
<LoggedInTemplate>
<li class="selected"><a runat="server" href="~/Default.aspx"><i class="fa fa-home"></i> Home</a></li>
<li><a runat="server" href="~/MyAccount.aspx"><i class="fa fa-briefcase"></i> My Account</a></li>
<li><a runat="server" href="~/Admin/Default.aspx" id="adminLink" Visible="False"><i class="fa fa-briefcase"></i> Administration</a></li>
<li><a id="logoutLink" runat="server" href="~/AuthHandler.ashx?logout=true"><i class="fa fa-phone"></i>Log out</a></li>
</LoggedInTemplate>
</asp:LoginView>
</ul>
I am trying the element with the id "adminLink". However, it does not appear in the designer file and referencing it in the .cs code behind file does not work. Am I making an obvious mistake?