Use this method to set a cookie value. The Name parameter is the cookie name, the MaxAge parameter specifies the length of time, in seconds, that the browser should cache the cookie, the Path parameter is the relative path under the domain that the cookie applies to, the Domain parameter is the web site domain that the cookie applies to, and the Secure parameter indicates whether the cookie applies to a secure domain/path (https://) or a normal domain/path (http://).
Using -1 (or any value less than 0) as the MaxAge parameter causes the cookie to be a session-only cookie that is automatically deleted by the web browser when it is closed/shut down.