AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

CookieHelper..::..CookieExist Method (HttpContextWrapper, String, String)

Determines whether a cookie (and optionally a specific key within it) exists in the request.

Namespace:  AdvantageCMS.Core.Utils
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static bool CookieExist(
	HttpContextWrapper context,
	string cookieName,
	string keyName
)

Parameters

context
Type: HttpContextWrapper
The context wrapper.
cookieName
Type: String
Name of the cookie.
keyName
Type: String
Name of the key. If empty, checks only for the cookie's existence.

Return Value

true if the cookie (and key, if specified) exists; otherwise, false.