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/2004/08/16/whidbey_personalization.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
MigrateAnonymous 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_OnMigrateAnonymous(sender As
Object, args As ProfileMigrateEventArgs)
Dim anonymousProfile As ProfileCommon =
Profile.GetProfile(args.AnonymousID)
Profile.ZipCode = anonymousProfile.ZipCode
Profile.CityAndState = anonymousProfile.CityAndState
Profile.StockSymbols = anonymousProfile.StockSymbols
''''''''
' Delete the anonymous profile. If the anonymous ID is not
' needed in the rest of the site, remove the anonymous cookie.
ProfileManager.DeleteProfile(args.AnonymousID)
AnonymousIdentificationModule.ClearAnonymousIdentifier()
' Delete the user row that was created for the anonymous user.
Membership.DeleteUser(args.AnonymousID, True)
End Sub