Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. void protected OnLogin()
  2. {
  3. if(UserIsAuthenticated)
  4. {
  5. Session["English"] = true;
  6. }
  7. }
  8.  
  9. void Application_BeginRequest(object sender, EventArgs e)
  10. {
  11. if(Request.PhysicalPath.Contains("English")
  12. {
  13. if(!((bool)Session["English"]))
  14. //Not "English" user - redirect to login or unauthorized page
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement