I have a application in ASP.Net C# 4.0
There's a Login Page and a HomePage.
Upon Login, i create a session variable 'EmpCode' and redirect to HomePage.
On HomePage, i am checking whether session variable 'EmpCode' exists or not. If not then i am redirecting it to Login Page.
As per requirement, I have added 10 more pages in my application.
Is there better way to authenticate user without having copy paste function to check session 'EmpCode' on each Page's Load Event.