Cookies Property

HttpBrowserCapabilities.Cookies Property

.NET Framework 1.1

Gets a value indicating whether the client browser supports cookies.

[Visual Basic]
Public ReadOnly Property Cookies As Boolean
[C#]
public bool Cookies {get;}
[C++]
public: __property bool get_Cookies();
[JScript]
public function get Cookies() : Boolean;

Property Value

true if the browser client supports cookies; otherwise, false. The default is false.

Example

Code in the following example executes only if the client browser supports Cookies.

[Visual Basic] 
If Request.Browser.Cookies = True Then
   '...
End If
   

[C#] 
if (Request.Browser.Cookies == true)
{
   //...
}
   

[C++] 
if (Request->Browser->Cookies)
{
   //...
}
   

[JScript] 
if(Request.Browser.Cookies){
   //...
}
   

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpBrowserCapabilities Class | HttpBrowserCapabilities Members | System.Web Namespace

Show:
© 2016 Microsoft