共用方式為


ProfilePropertySettings 建構函式

定義

初始化 ProfilePropertySettings 類別的新執行個體。

多載

ProfilePropertySettings(String)

使用指定的名稱,初始化 ProfilePropertySettings 類別的新執行個體。

ProfilePropertySettings(String, Boolean, SerializationMode, String, String, String, Boolean, String)

使用指定的名稱和設定,初始化 ProfilePropertySettings 類別的新執行個體。

ProfilePropertySettings(String)

使用指定的名稱,初始化 ProfilePropertySettings 類別的新執行個體。

public:
 ProfilePropertySettings(System::String ^ name);
public ProfilePropertySettings (string name);
new System.Web.Configuration.ProfilePropertySettings : string -> System.Web.Configuration.ProfilePropertySettings
Public Sub New (name As String)

參數

name
String

ProfilePropertySettings 物件的唯一名稱。

備註

下表顯示用於此建構函式的預設設定。

設定 預設值
AllowAnonymous false.
DefaultValue 空字串 ("")。
ReadOnly false.
SerializeAs ProviderSpecific.
Type 空字串 ("")。

另請參閱

適用於

ProfilePropertySettings(String, Boolean, SerializationMode, String, String, String, Boolean, String)

使用指定的名稱和設定,初始化 ProfilePropertySettings 類別的新執行個體。

public:
 ProfilePropertySettings(System::String ^ name, bool readOnly, System::Web::Configuration::SerializationMode serializeAs, System::String ^ providerName, System::String ^ defaultValue, System::String ^ profileType, bool allowAnonymous, System::String ^ customProviderData);
public ProfilePropertySettings (string name, bool readOnly, System.Web.Configuration.SerializationMode serializeAs, string providerName, string defaultValue, string profileType, bool allowAnonymous, string customProviderData);
new System.Web.Configuration.ProfilePropertySettings : string * bool * System.Web.Configuration.SerializationMode * string * string * string * bool * string -> System.Web.Configuration.ProfilePropertySettings
Public Sub New (name As String, readOnly As Boolean, serializeAs As SerializationMode, providerName As String, defaultValue As String, profileType As String, allowAnonymous As Boolean, customProviderData As String)

參數

name
String

ProfilePropertySettings 物件的唯一名稱。

readOnly
Boolean

true 表示動態產生之 ProfileCommon 類別中的相關聯屬性應該是唯讀的,否則為 false

serializeAs
SerializationMode

其中一個 SerializationMode 值。

providerName
String

Providers 屬性的提供者名稱,或空字串 ("")。

defaultValue
String

字串,包含用於產生頁面設定檔類別中具名屬性的預設值。

profileType
String

有效型別參考或空字串。

allowAnonymous
Boolean

true 表示動態產生之 ProfileCommon 類別中的相關聯屬性應該支援匿名使用者,false 則表示匿名使用者無法變更具名屬性。

customProviderData
String

字串,包含與屬性相關聯之提供者所使用的特定提供者資訊。

備註

在執行時間,ASP.NET 編譯系統會使用組態檔 區段中指定 profile 的資訊來產生名為 ProfileCommon 的類別,其衍生自 ProfileBase 。 類別可讓您存取和修改個別使用者設定檔的值。

類別 ProfileCommon 定義是以組態檔區段子區段中 profile 定義的 properties 屬性為基礎。 當您建立 類別的 ProfilePropertySettings 實例時所指定的參數值,將用來定義 類別中的 ProfileCommon 相關聯屬性。

如需配置檔案屬性的詳細資訊,請參閱 配置檔案屬性概觀 ASP.NET

另請參閱

適用於