title: How Can I Hide or Show Asp:Content using a Session in If statement
body: <p>At my Production.aspx Web Form I have this code:</p>
  
  <pre><code>    &lt;%@ Page Title="" Language="C#" MasterPageFile="~/Index.Master" AutoEventWireup="true" CodeBehind="Production.aspx.cs" Inherits="WebPortal.Production" %&gt;
      &lt;asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;  
          &lt;h3&gt;PRODUCTION SITE&lt;/h3&gt;    
          &lt;img src="" alt="Production Logo" height="350" width="350" /&gt;
      &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server"&gt;
      &lt;asp:Login ID="Login1" runat="server" BackColor="#F7F7DE" BorderColor="#CCCC99" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="10pt" Height="187px" Width="235px"&gt;
          &lt;TitleTextStyle BackColor="#6B696B" Font-Bold="True" ForeColor="#FFFFFF" /&gt;
      &lt;/asp:Login&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" runat="server"&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>And at my Production.aspx.cs Web Form i Have this Code:</p>
  
  <pre><code>namespace WebPortal
  {
      public partial class Production : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              try
              {
                  var GetSession = Session["Counter"];
                  if (Convert.ToInt32(GetSession) == 1)
                  {
                      // Show Content 1
                  }
                  else if (Convert.ToInt32(GetSession) == 2)
                  {
                      // Show Content 2
                  }
                  else
                  {
                      // Show Content 3
                  }
              }
              catch (Exception ex) 
              {
                  // MessageBox.show(ex.message.tostring());
              }
          }     
      }
  }
  </code></pre>
  
  <p>how can i try to hide a content based on the session value like when a user try to login by its account and based on its access level he gets a 1 which trigger the if statement then based on its value on what content to show..</p>