System.Web.Profile.ProfileMigrateEventArgs Class

Provides data for the ProfileModule.MigrateAnonymous event of the System.Web.Profile.ProfileModule class.

See Also: ProfileMigrateEventArgs Members


public sealed class ProfileMigrateEventArgs : EventArgs


The System.Web.Profile.ProfileMigrateEventArgs object provides event information to the ProfileModule.MigrateAnonymous event of the System.Web.Profile.ProfileModule class. The System.Web.Profile.ProfileMigrateEventArgs object provides access to the System.Web.HttpContext of the current request and the anonymous user identifier for the anonymous profile in the ProfileMigrateEventArgs.AnonymousID property.

You can use the ProfileModule.MigrateAnonymous event to copy profile property values from an anonymous profile to an authenticated profile when a user who has been anonymously using your application logs in.

When an application that has the user profile enabled is started, ASP.NET creates a new class of type ProfileCommon, which inherits from the System.Web.Profile.ProfileBase class. When the ProfileCommon class is generated, based on the profile properties specified in the Web.config file, a GetProfile method is added that enables you to retrieve a ProfileCommon object based on a user name. You can use the GetProfile method of the current profile to retrieve the property values of the anonymous profile. The anonymous property values can then be copied to the current profile for the authenticated user.


Namespace: System.Web.Profile
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0