title: How to retrieve session value and do a check in other page in asp.net
body: <pre><code> reader = server.ExecuteReader(CommandType.Text, getPermissionlistQuery, param);
          var results = new List&lt;string&gt;();
          while (reader.Read())
          {
              results.Add(reader["permissionName"].ToString());
          }
          reader.Close();
          Session.Add("Permissions", results);
  </code></pre>
  
  <p>I am adding results to the session, how can I retrieve it in another page. </p>
  
  <p>results  is a list of values</p>
  
  <pre><code>var permissionList = Session["Permissions"];         
          string check = "Create Groups";
          if (permissionList.Any(item =&gt; item.Equals(check)))
          {
              // results contains the value in check 
          }
  </code></pre>
  
  <p>and I want to check whether the permission is available in the Permission list but the if statement is throwing a error</p>
  
  <pre><code>'object' does not contain a definition for 'Any' and no extension method 'Any' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
  </code></pre>