HttpContext.Profile 屬性

定義

取得目前使用者設定檔的 ProfileBase 物件。Gets the ProfileBase object for the current user profile.

public:
 property System::Web::Profile::ProfileBase ^ Profile { System::Web::Profile::ProfileBase ^ get(); };
public System.Web.Profile.ProfileBase Profile { get; }
member this.Profile : System.Web.Profile.ProfileBase
Public ReadOnly Property Profile As ProfileBase

屬性值

如果應用程式組態檔包含設定檔屬性的定義,則為 ProfileBase;否則為 nullA ProfileBase if the application configuration file contains a definition for the profile's properties; otherwise, null.

備註

Profile 屬性是用來使用型別安全 API,針對結構化資料進行持續性儲存。A Profile property is used for persistent storage of structured data using a type-safe API. 當存取 Profile 屬性但沒有任何值時,會傳回空的實例;不會傳回 nullWhen a Profile property is accessed but no value is present, an empty instance is returned; null is not returned.

適用於

另請參閱