CookieHandlerElement.PersistentSessionLifetime 屬性

定義

取得或設定由處理常式所發出的 cookie 的存留期。

public:
 property TimeSpan PersistentSessionLifetime { TimeSpan get(); void set(TimeSpan value); };
[System.Configuration.ConfigurationProperty("persistentSessionLifetime", DefaultValue="0:0:0", IsRequired=false)]
[System.Configuration.TimeSpanValidator(MaxValueString="365.0:0:0", MinValueString="0:0:0")]
public TimeSpan PersistentSessionLifetime { get; set; }
[<System.Configuration.ConfigurationProperty("persistentSessionLifetime", DefaultValue="0:0:0", IsRequired=false)>]
[<System.Configuration.TimeSpanValidator(MaxValueString="365.0:0:0", MinValueString="0:0:0")>]
member this.PersistentSessionLifetime : TimeSpan with get, set
Public Property PersistentSessionLifetime As TimeSpan

屬性值

表示 Cookie 存留期的 TimeSpan。 默認值為 0 天 (“0.0:0:0”) 。 此值必須是介於 0 (“0.0:0:0”) 和 365 (“365.0:0:0”) 天之間的值。

屬性

備註

表示 persistentSessionLifetimecookieHandler> 項目的 屬性<

適用於

另請參閱