The base profile for users in EPiServer. Defines some basic information to implement common personalization
solutions in a web site. Also contains personalization data needed for EPiServers edit mode.
Namespace:
EPiServer.PersonalizationAssembly: EPiServer (in EPiServer.dll) Version: 5.2.375.236
Syntax
| C# |
|---|
[SerializableAttribute] public class EPiServerProfile : ProfileBase |
Examples
Example that is saving a dummy value in global scope, this information will be available on all pages for this user.
// Print current value if (EPiServerProfile.Current["MyTestKey"] != null) Response.Write(EPiServerProfile.Current["MyTestKey"]); // Set new value EPiServerProfile.Current["MyTestKey"] = "MyTestValue";
Example of greeting a user with name.
if (EPiServerProfile.Current != null) { if (EPiServerProfile.Current.FirstName != null) Response.Write("Greetings " + EPiServerProfile.Current.FirstName); }
Inheritance Hierarchy
System..::.Object
System.Configuration..::.SettingsBase
System.Web.Profile..::.ProfileBase
EPiServer.Personalization..::.EPiServerProfile
System.Configuration..::.SettingsBase
System.Web.Profile..::.ProfileBase
EPiServer.Personalization..::.EPiServerProfile