Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Login and Login Status Control In Asp.net

Login and Login Status Control In Asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ejaz_pk
    wrote on last edited by
    #1

    I am using login and loginstatus controls in my application. When I logged In It change the login status control text to logout which is fine but when I click the logout button it does not take me to the login page again.And how I can stop user to go back by clicking back button in the browser once he is logged off. How I can store login username in session variable by using login control? THanks In advance Ejaz

    N 1 Reply Last reply
    0
    • E ejaz_pk

      I am using login and loginstatus controls in my application. When I logged In It change the login status control text to logout which is fine but when I click the logout button it does not take me to the login page again.And how I can stop user to go back by clicking back button in the browser once he is logged off. How I can store login username in session variable by using login control? THanks In advance Ejaz

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      To prevent the user from using the back button and gaining access after logoff you need to add checks to each page that verify the user has logged in, if not redirect them to the login page. After the user has logged in you can get the username from the security principal, like WindowsIdentity.Name


      only two letters away from being an asset

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups