asp.net.ph

HttpCookie.Secure Property

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 );

Property Value

true to transmit the cookie securely; otherwise, false. The default value is false.

Example

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
}
See Also

HttpCookie Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph