All methods of this class are static which is the reason why only a single Cookie can be managed at a time. The idea is that you can use this single cookie as an application global Cookie to track a user and then retrieve additional storage information from other locations (like a database or session).
public class StaticCookieManager : object
Member | Description | |
---|---|---|
Constructor | ||
CookieName | ||
CookieTimeoutInMonths | ||
CookieExist | Determines whether the cookie exists public static bool CookieExist();
|
|
GetId | public static string GetId();
|
|
Remove | Removes the cookie by clearing it out and expiring it immediately. public static void Remove();
|
|
WriteCookie | Writes the cookie into the response stream with the value passed. The value is always the UserId. public static void WriteCookie(string Value,
bool NonPersistent); public static void WriteCookie(string Value);
|