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. Capture the user role globally in application.

Capture the user role globally in application.

Scheduled Pinned Locked Moved ASP.NET
databasewinforms
3 Posts 3 Posters 0 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.
  • A Offline
    A Offline
    aakar
    wrote on last edited by
    #1

    Hi, In my application I am using a function that is currently written in the app_code directory. This function called GetRole() gets the role of the logged-in user from the database table. The function is called from almost all of the pages and user controls in my application both on Page Load as well as on the PostBack events such as the click of a button etc. Now is it possible that I get the Users Role only once when the user launches the application and store it across all pages in my application. We are not allowed to use sessions. Any ideas would be appreciated. Thanks in advance, Aakar

    M 1 Reply Last reply
    0
    • A aakar

      Hi, In my application I am using a function that is currently written in the app_code directory. This function called GetRole() gets the role of the logged-in user from the database table. The function is called from almost all of the pages and user controls in my application both on Page Load as well as on the PostBack events such as the click of a button etc. Now is it possible that I get the Users Role only once when the user launches the application and store it across all pages in my application. We are not allowed to use sessions. Any ideas would be appreciated. Thanks in advance, Aakar

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      You can store it in Cookies or Cache.

      aakar wrote:

      We are not allowed to use sessions.

      Why are you not allowed to use Sessions?

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

      U 1 Reply Last reply
      0
      • M Michael Sync

        You can store it in Cookies or Cache.

        aakar wrote:

        We are not allowed to use sessions.

        Why are you not allowed to use Sessions?

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        U Offline
        U Offline
        UsmanMunier
        wrote on last edited by
        #3

        you can also use Profiling if you dont want to use session Regards,

        Usman Munier Xavor Corporation Pakistan

        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