How to access server variable in aspx?
<p>I’ve defined a session variable in my Session_Start procedure</p>

<p>void Session_Start(object sender, EventArgs e)</p>

<pre><code>{

&lt;other stuff&gt;

        string sAdmin= bAdmin.ToString();

        Session["SessionAdmin"] = sAdmin;

}
</code></pre>

<p>Then in my masterpage I want to use the Session Variable to conditionally show some links in a list.</p>

<p>How do I write the Boolean expression to correctly access the session variable SessionAdmin?</p>

<p>Here’s what I have:</p>

<pre><code> &lt;div id="menu"&gt;

          &lt;ul&gt;

        &lt;li&gt;&lt;a href="/EmployeeTime.aspx"&gt;Employee Time&lt;/a&gt;&lt;/li&gt;

        &lt;% if (  *** a Boolean expression involving Session variable "SessionAdmin" *** ) {%&gt;

                     &lt;li&gt;&lt;a href="/Employee.aspx"&gt;Employees&lt;/a&gt;&lt;/li&gt;

                     &lt;li&gt;&lt;a href="/ProductLine.aspx"&gt;Product Lines&lt;/a&gt;&lt;/li&gt;

                     &lt;li&gt;&lt;a href="/Task.aspx"&gt;Tasks&lt;/a&gt;&lt;/li&gt;

                     &lt;li&gt;&lt;a href="/Type.aspx"&gt;Work Types&lt;/a&gt;&lt;/li&gt;

                     &lt;li&gt;&lt;a href="/Activity.aspx"&gt;Activities&lt;/a&gt;&lt;/li&gt;

        &lt;%} %&gt;&gt;

          &lt;/ul&gt;

   &lt;/div&gt;
</code></pre>

<p>How do I correctly define my boolean expression? I've been looking, but haven't found the right syntax.</p>

<p>Thanks in advance</p>
