Export (0) Print
Expand All

Cookie Constructor (String, String)

.NET Framework 1.1

Initializes a new instance of the Cookie class with a specified Name and Value.

[Visual Basic]
Public Sub New( _
   ByVal name As String, _
   ByVal value As String _
)
[C#]
public Cookie(
   string name,
 string value
);
[C++]
public: Cookie(
   String* name,
 String* value
);
[JScript]
public function Cookie(
   name : String,
 value : String
);

Parameters

name
The name of a Cookie. The following characters must not be used inside name: equal sign, semicolon, comma, newline (\n), return (\r), tab (\t). The dollarsign character cannot be the first character.
value
The value of a Cookie. The following characters must not be used inside value: semicolon, comma.

Remarks

The default for the value parameter uses the empty string ("") .

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Cookie Class | Cookie Members | System.Net Namespace | Cookie Constructor Overload List | CookieCollection | CookieContainer | CookieException

Show:
© 2014 Microsoft