AnonymousIdentificationEventArgs.AnonymousID AnonymousIdentificationEventArgs.AnonymousID AnonymousIdentificationEventArgs.AnonymousID AnonymousIdentificationEventArgs.AnonymousID Property


Gets or sets the anonymous identifier for the user.

 property System::String ^ AnonymousID { System::String ^ get(); void set(System::String ^ value); };
public string AnonymousID { get; set; }
member this.AnonymousID : string with get, set
Public Property AnonymousID As String

Property Value

The anonymous identifier for the user.


The following code example uses the AnonymousIdentification_Creating event to set the anonymous identifier to a custom value.

public void AnonymousIdentification_Creating(object sender, 
                                             AnonymousIdentificationEventArgs args)
  args.AnonymousID = Samples.AspNet.Security.MyIdClass.GetAnonymousId();
Public Sub AnonymousIdentification_Creating(sender As Object,  _
                                            args As AnonymousIdentificationEventArgs)
  args.AnonymousID = Samples.AspNet.Security.MyIdClass.GetAnonymousId()
End Sub


You can use the AnonymousID property to set the anonymous identifier to a custom value during the AnonymousIdentification_Creating event. If you do not specify a value for the AnonymousID property during the AnonymousIdentification_Creating event, a Guid is used.

The AnonymousIdentification_Creating event is only raised when the anonymous identification is Enabled.

Applies to