Decodes a cookie from definable protection level.
| C# | Visual Basic | Visual C++ |
public static HttpCookie Decode( HttpCookie cookie )
Public Shared Function Decode ( _ cookie As HttpCookie _ ) As HttpCookie
public: static HttpCookie^ Decode( HttpCookie^ cookie )
- cookie (HttpCookie)
- The encoded cookie to decode of type HttpCookie.
An object of type HttpCookie which is the decoded cookie.
The following C# example shows how to decode a cookie that has been encoded using "Encryption" only.
CopyC#
HttpCookie standardCookie = Request.Cookies["MyCookieName"]; if(standardCookie!=null) { HttpCookie decodedCookie = Rolosoft.WebControls.CookieSecure.Decode(standardCookie); //...Go on to process decoded cookie }
| Exception | Condition |
|---|---|
| CookieSecureException | Thrown if cookie is invalid or tampered. |