title: how to check session variable existence in MVC before we do any activity on page?
body: <p>I have a scenario like :</p>
  
  <p>search control where our data entry guys enter user id and search for their details and navigate through different pages related to that user.</p>
  
  <p>So in my MVC application right now i am setting a session to maintain the user id in session variable. And on every method on page (like edit, update ..etc) I am checking if user session exist or not. Can i do it globally so i don't need to check every time? Like in global.asax  </p>
  
  <pre><code>protected void Application_Start()
  {
  }
  </code></pre>
  
  <p>or write a custom method to check the session.</p>
  
  <p>Please can somebody help me the way to do it.</p>
  
  <p>Thanks</p>