Hi Samuel,
You can do exactly this with ASP.NET 2.0 using Anonymous Profiles and
Membership. Use anonymous profiles while the user is browsing and adding to
the basket and then migrate the contents once they log in.
More Here:
http://www.ondotnet.com/pub/a/dotnet...html?page=last
and here
http://msdn2.microsoft.com/en-us/library/ewfkf772.aspx
Ken
Microsoft MVP [ASP.NET]
Migrating Anonymous Profile Information
In some cases, your application might initially be maintaining
personalization information for an anonymous user, but eventually the user
logs in to your application. In that case, the user's identity changes from
the assigned anonymous user identity to the identity provided by the
authentication process.
When users log in (that is, when they stop being anonymous users), the
MigrateAnonymou s event is raised. You can handle this event to migrate
information from the user's anonymous identity to the new authenticated
identity, if necessary. The following code example shows how to migrate
information when a user is authenticated.
Visual Basic Copy CodePublic Sub Profile_OnMigra teAnonymous(sen der As
Object, args As ProfileMigrateE ventArgs)
Dim anonymousProfil e As ProfileCommon =
Profile.GetProf ile(args.Anonym ousID)
Profile.ZipCode = anonymousProfil e.ZipCode
Profile.CityAnd State = anonymousProfil e.CityAndState
Profile.StockSy mbols = anonymousProfil e.StockSymbols
''''''''
' Delete the anonymous profile. If the anonymous ID is not
' needed in the rest of the site, remove the anonymous cookie.
ProfileManager. DeleteProfile(a rgs.AnonymousID )
AnonymousIdenti ficationModule. ClearAnonymousI dentifier()
' Delete the user row that was created for the anonymous user.
Membership.Dele teUser(args.Ano nymousID, True)
End Sub
"Samuel Shulman" <sa************ @ntlworld.comwr ote in message
news:Oy******** ******@TK2MSFTN GP04.phx.gbl...
>I want to allow customer to 'Add to Basket' even if they are not logged.
Once they log the content of the basket will be saved for the future
Next time they may add other items to the basket before they log and then
they may log
What is expected at that point?
Merge the content of the baskets delete the old one or else
Thank you for your advice,
Samuel