title: Session is set or not in ASP.NET
body: <p>How to check that any of a <em>Session</em> is set or not in ASP.NET C# as we do in PHP </p>
  
  <pre><code> if(session_id() == '')
   {
        // session has NOT been started
        session_start();
   }
   else
   {
        // session has been started
   }
  </code></pre>
  
  <p>And in ASP.Net C#</p>
  
  <pre><code>if (Session["userRole"].ToString() == "2")
         GridView3.Columns[7].Visible= true;   
  else{
         GridView3.Columns[7].Visible= false;
  </code></pre>
  
  <p>The above code only checks the session named <em>userRole</em>.
  What is the alternate way of the above PHP code to C#?</p>