Membership via ASP.NET 2.0

K

Kevin

Am trying to get the hang of ASP.NET 2.0 and am looking at membership .
Once a user has created a new account via the wizard, how can I get the
UserID?
Want to do this as will be able to add a linked table to store additional
details on the user.
Also when an existing user logs in, will need his UserID also, to extract
the extra data in the linked table.
Thanks
Kevin
 
G

Guest

Hello Kevin,

You can get the MembershipUser object from the
SqlMembershipProvider.GetUser() method. You can get the user's key from the
MembershipUser.ProviderUserKey property. That should allow you to build a
linkage table of your own construction.
 
J

Jan Hyde

Am trying to get the hang of ASP.NET 2.0 and am looking at membership .
Once a user has created a new account via the wizard, how can I get the
UserID?
Want to do this as will be able to add a linked table to store additional
details on the user.
Also when an existing user logs in, will need his UserID also, to extract
the extra data in the linked table.
Thanks

Have you considered adding profile properties, then you can
add your custom properties to your web.config and let ASP
take care of the tables. You don't need to worry about
UserID either.


Jan Hyde (VB MVP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top