Handles subscription for the current user through personalization
Namespace:
EPiServer.PersonalizationAssembly: EPiServer (in EPiServer.dll) Version: 5.2.375.236
Syntax
| C# |
|---|
public class Subscription |
Remarks
Subscription stores the state as SubscriptionInfo in the personalized EPiServerProfile object
This class uses internally the SubscriptionInfo class that support reading subscription information from a arbitrary user but passes in the currently online cached user.
Examples
Adds a subscription for a user
CopyC#
if (Subscription.IsSubscribingTo(CurrentPageLink)) Response.Write("User is already subscribing"); else { Subscription.SubscribeTo(CurrentPageLink); Response.Write("Subscription addedd"); }