I have a created a Simple **LOGIN form**...I want to Check **Session["UserId"]** is null or not...on every page load.

Instead of writing on every Page to Check **Session["UserId"]** is null or not.

what is the alternative way to write a common Code and call every page
except **LOGIN and REGISTRATION Form**

if **Session["UserId"]** is null then i can easily Redirect to LOGIN Form
or Else the Code is ongoing

If Possible you can give me Code with example..
Thank You!!