System.Web Namespace HttpCookie Class
Sets or retrieves a value indicating whether to transmit the cookie securely ( that is, over HTTPS only ).
[ VB ]
Public Property Secure As Boolean
[ C# ]
public bool Secure {get; set;}
[ C++ ]
public: __property bool get_Secure ( );
public: __property void set_Secure ( bool );
[ JScript ]
public function get Secure ( ) : Boolean;
public function set Secure ( Boolean );
true to transmit the cookie securely; otherwise, false. The default value is false.
The following example takes action if the cookie is set to transmit securely.
[ VB ]
If myCookie.Secure Then
' ... do whatever here
End If
[ C# ]
if ( myCookie.Secure ) {
// ... do whatever here
}
HttpCookie Members