Export (0) Print
Expand All

Cookie Constructor (String, String, String, String)

.NET Framework 1.1

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

[Visual Basic]
Public Sub New( _
   ByVal name As String, _
   ByVal value As String, _
   ByVal path As String, _
   ByVal domain As String _
)
[C#]
public Cookie(
   string name,
 string value,
 string path,
 string domain
);
[C++]
public: Cookie(
   String* name,
 String* value,
 String* path,
 String* domain
);
[JScript]
public function Cookie(
   name : String,
 value : String,
 path : String,
 domain : 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 object. The following characters must not be used inside value: semicolon, comma.
path
The subset of URIs on the origin server to which this Cookie applies. The default value is "/".
domain
The optional internet domain for which this Cookie is valid. The default value is the host this Cookie has been received from.

Remarks

The default for the domain and path parameters 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