This documentation is archived and is not being maintained.
HttpCookie.Value Property
.NET Framework 1.1
Gets or sets an individual cookie value.
[Visual Basic] Public Property Value As String [C#] public string Value {get; set;} [C++] public: __property String* get_Value(); public: __property void set_Value(String*); [JScript] public function get Value() : String; public function set Value(String);
Property Value
The value of the cookie. The default value is a null reference (Nothing in Visual Basic).
Example
The following example sets the value of an existing cookie to "abc123".
[Visual Basic] MyCookie.Value = "abc123" [C#] MyCookie.Value = "abc123"; [C++] MyCookie->Value = S"abc123"; [JScript] myCookie.Value = "abc123"
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpCookie Class | HttpCookie Members | System.Web Namespace
Show: