AnonymousIdentificationEventArgs.AnonymousID プロパティ

定義

ユーザーの匿名識別子を取得または設定します。

public:
 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

プロパティ値

ユーザーの匿名識別子。

次のコード例では、 AnonymousIdentification_Creating イベントを使用して匿名識別子をカスタム値に設定します。

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

注釈

プロパティを AnonymousID 使用すると、 AnonymousIdentification_Creating イベント中に匿名識別子をカスタム値に設定できます。 AnonymousIdentification_Creating イベント中に プロパティのAnonymousID値を指定しない場合はGuid が使用されます。

AnonymousIdentification_Creating イベントは、匿名 ID が のEnabled場合にのみ発生します。

適用対象