ProfilePropertySettings 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 ProfilePropertySettings 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| 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 。
備註
下表顯示此建構子所使用的預設設定。
| Setting | 預設值 |
|---|---|
| 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 價值。
- defaultValue
- String
包含生成頁面 Profile 類別中所用該屬性預設值的字串。
- profileType
- String
一個有效的型別參考或空字串。
- allowAnonymous
- Boolean
true 在動態產生 ProfileCommon 的類別中標示相關屬性時,應支援匿名使用者;否則,則表示 false匿名使用者無法更改所命名的屬性。
- customProviderData
- String
包含與該屬性相關聯的提供者所使用的提供者特定資訊的字串。
備註
執行時,ASP.NET 編譯系統會根據設定檔區段中指定的 profile 資訊產生一個稱為 ProfileCommon的類別,該類別由 衍生而 ProfileBase來。 這個類別允許你存取並修改個別使用者設定檔的數值。
ProfileCommon類別定義基於設定檔該properties節子節中定義profile的屬性。 你在建立類別實例 ProfilePropertySettings 時指定的參數值,會用來定義類別中 ProfileCommon 相關的屬性。
欲了解更多關於剖面屬性的資訊,請參閱 ASP.NET 剖面屬性概覽。