|
Subject:
|
connecting ASPNETDB.MDF to an E-commerce Cart
|
|
Posted By:
|
orion846
|
Post Date:
|
1/2/2007 10:34:18 AM
|
I'm trying to figure out how to associate users in my ASPNETDB.MDF to create a shopping cart.
IE: I have 3 tables, for a list of existing orders, list of products, and list of specific orders.
The idea is for users who've signed up with the built-in user creation control, can then place orders from the shopping cart, and view their existing previous orders. This would normally be done with a unique UserID # to associate orders with specific users, however I don't BELIEVE there's anything like UserID's associated with each user in the ASPNETDB.MDF, it just uses usernames as the unique identifiers right?
Anyway I'm not sure I'm explaining what I'm trying to do perfectly and I apologize, but I don't think it's an un-common problem I'm having. Basically I'm trying to avoid having to have existing ASPNETDB users create a sort of SECOND user that would associate them into a seperate Customers table, it seems like extra user steps that shouldn't be necessary.
|
|
Reply By:
|
Imar
|
Reply Date:
|
1/2/2007 10:49:39 AM
|
The user does have a unique ID. Only its name is a little odd: ProviderUserKey. You can get it like this:
Membership.GetUser().ProviderUserKey
for the currently logged on user. The ID is then stored in the UserId column of the aspnet_Users and aspnet_Membership tables.
Hope this helps,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|