title: How to redirect user to login page if session expire in MVC 4 Razor syntax
body: <p>On _LoginPartial.cshtml I  have put following code which display username for user session:</p>
  
  <pre><code>&lt;p&gt;Hello , &lt;span&gt;@Session["username"]&lt;/span&gt; &lt;/p&gt;
  </code></pre>
  
  <p>but here I want to add one more condition that if session expire user must redirect to login pages and session must be abandon.</p>
  
  <p>How to achieve this.</p>
  
  <p>Thanks</p>