共用方式為


AnonymousIdentificationSection.Enabled 屬性

定義

取得或設定一個值,指示是否啟用匿名識別。

public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

屬性值

true若啟用匿名識別;否則,。 false 預設值為 false

屬性

範例

以下程式碼範例說明如何存取該 Enabled 物業。

   // Get Enabled.
   bool aIdEnabled =
       anonymousIdentificationSection.Enabled;

   Console.WriteLine("Anonymous identification enabled: {0}",
       aIdEnabled.ToString());
' Get Enabled.
Dim aIdEnabled As Boolean = _
anonymousIdentificationSection.Enabled
Console.WriteLine("Anonymous identification enabled: {0}", _
aIdEnabled.ToString())

備註

Enabled 設定為 true,則使用 cookie 管理使用者的狀態資訊。

適用於