SessionStateSection.AllowCustomSqlDatabase 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指示使用者是否能在屬性中 SqlConnectionString 指定初始目錄值。
public:
property bool AllowCustomSqlDatabase { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("allowCustomSqlDatabase", DefaultValue=false)]
public bool AllowCustomSqlDatabase { get; set; }
[<System.Configuration.ConfigurationProperty("allowCustomSqlDatabase", DefaultValue=false)>]
member this.AllowCustomSqlDatabase : bool with get, set
Public Property AllowCustomSqlDatabase As Boolean
屬性值
true如果使用者被允許指定目錄;否則,。 false 預設值為 false。
- 屬性
範例
以下程式碼範例示範如何取得該 AllowCustomSqlDatabase 財產。 參考課程主題中的 SessionStateSection 程式碼範例,學習如何存取該 SessionStateSection 物件。
// Display the current AllowCustomSqlDatabase property value.
Console.WriteLine("AllowCustomSqlDatabase: {0}",
sessionStateSection.AllowCustomSqlDatabase);
' Display the current AllowCustomSqlDatabase property value.
Console.WriteLine("AllowCustomSqlDatabase: {0}", _
sessionStateSection.AllowCustomSqlDatabase)