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. user name in database!

user name in database!

Scheduled Pinned Locked Moved ASP.NET
databasesecuritytutorial
6 Posts 2 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.
  • N Offline
    N Offline
    nclauder
    wrote on last edited by
    #1

    Hi, I'm wondering how to do this, I'm working on the on a datagrid and I'm using windows authentication. I managed to get username on to a login form, but I want it to be stored into the database.The code of web config looks like: authentication mode="Windows" identity impersonate="true" And the Login page looks like on(Page_load): Response.Write(Page.User.Identity.Name); Thanks.

    V 1 Reply Last reply
    0
    • N nclauder

      Hi, I'm wondering how to do this, I'm working on the on a datagrid and I'm using windows authentication. I managed to get username on to a login form, but I want it to be stored into the database.The code of web config looks like: authentication mode="Windows" identity impersonate="true" And the Login page looks like on(Page_load): Response.Write(Page.User.Identity.Name); Thanks.

      V Offline
      V Offline
      varshavmane
      wrote on last edited by
      #2

      What exactly is ur problem?? If u want to get the windows login name then use: HttpContext.Current.User.Identity.Name or else tell us what is the exact problem. All the Best...

      N 1 Reply Last reply
      0
      • V varshavmane

        What exactly is ur problem?? If u want to get the windows login name then use: HttpContext.Current.User.Identity.Name or else tell us what is the exact problem. All the Best...

        N Offline
        N Offline
        nclauder
        wrote on last edited by
        #3

        Thanks, I want is when any one uses the website the Windows Login name should appear in a particular datagrid column automatically. Thanks.

        V 1 Reply Last reply
        0
        • N nclauder

          Thanks, I want is when any one uses the website the Windows Login name should appear in a particular datagrid column automatically. Thanks.

          V Offline
          V Offline
          varshavmane
          wrote on last edited by
          #4

          Your problem is solved or not????

          N 2 Replies Last reply
          0
          • V varshavmane

            Your problem is solved or not????

            N Offline
            N Offline
            nclauder
            wrote on last edited by
            #5

            Not yet solved. When I try using: HttpContext.Current.User.Identity.Name; I get error: Only assignment, call, increment, decrement, and new object expressions can be used as a statement. Thanks

            1 Reply Last reply
            0
            • V varshavmane

              Your problem is solved or not????

              N Offline
              N Offline
              nclauder
              wrote on last edited by
              #6

              varshavmane, I think this will help anderstand my problem is there a way The windows login can be saved automatically into database whenever a user uses the website? since I'm working with datagrid. Thanks

              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