语言

SessionStateSection.AllowCustomSqlDatabase 属性

定义

获取或设置一个值,该值指示用户是否可以在属性中 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)

适用于