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. membershipuser contrlos and sql db userid

membershipuser contrlos and sql db userid

Scheduled Pinned Locked Moved Web Development
databasecsharpasp-netquestion
4 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.
  • A Offline
    A Offline
    ABBASI_RA
    wrote on last edited by
    #1

    I have a database(mydb) with userid fild data. and i want to use AspLogin control and other control that manage membership that uses aspnetdb of asp.net application. so how i can use the userid of aspnetdb and bring it in my own database(mydb) when the users loged in ? thanks

    B 1 Reply Last reply
    0
    • A ABBASI_RA

      I have a database(mydb) with userid fild data. and i want to use AspLogin control and other control that manage membership that uses aspnetdb of asp.net application. so how i can use the userid of aspnetdb and bring it in my own database(mydb) when the users loged in ? thanks

      B Offline
      B Offline
      badgrs
      wrote on last edited by
      #2

      You have a couple of options: 1. When a new user is created you can hook into the event, get the Guid and username and post that into your database then. 2. Use Membership.User.Guid (I think thats it, better double check), this returns the Guid of the current logged in user.

      A 1 Reply Last reply
      0
      • B badgrs

        You have a couple of options: 1. When a new user is created you can hook into the event, get the Guid and username and post that into your database then. 2. Use Membership.User.Guid (I think thats it, better double check), this returns the Guid of the current logged in user.

        A Offline
        A Offline
        ABBASI_RA
        wrote on last edited by
        #3

        thanks for your attention. but there isnt any member or method like Membership.User.Guid anyway thanks again goodluck

        B 1 Reply Last reply
        0
        • A ABBASI_RA

          thanks for your attention. but there isnt any member or method like Membership.User.Guid anyway thanks again goodluck

          B Offline
          B Offline
          badgrs
          wrote on last edited by
          #4

          Membership.GetUser().ProviderUserKey is what I meant. The method returns a type of System.Object but if your using SQL Server and the built in membership provider its of the type Guid.

          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