CommerceContext.UserProfile Property (BCL)

The UserProfile property is a read/write Profile object containing the profile for the current user.

Definition

[Visual Basic .NET]

Public Property UserProfile As Profile

[C#]

public Profile UserProfile{get; set;} 

Property Value

The Profile object containing the profile for the current user.

Remarks

The OrganizationProfile property is dependent on being set by the UserProfile profile property or set explicitly. The UserProfile property is dependent on being set by UserId property or set explicitly, and the UserId property is dependent upon being set explicitly or obtaining the Id from the AuthTicket object, if it exists.

If this property is accessed before it has been explicitly set, the profile will be automatically retrieved from the Profiling System using the UserId property and the settings in the profiles section in the web.config file. The property returns null if the user profile does not exist. This property throws a CommerceException if the UserProfile property has not been previously set and either the UserId or ProfileSystem property is null.

Requirements

Namespace: Microsoft.CommerceServer.Runtime

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Runtime.dll

See Also

Code to display targeted advertisements on an ASP.NET Web form

Code to retrieve and display profile properties

Code to create and set profile properties

Copyright © 2005 Microsoft Corporation.
All rights reserved.