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.

适用于

另请参阅