System.Web Namespace HttpCookie Class
Sets or retrieves the virtual path to transmit with the current cookie.
[ VB ]
Public Property Path As String
[ C# ]
public string Path {get; set;}
[ C++ ]
public: __property String* get_Path ( );
public: __property void set_Path ( String* );
[ JScript ]
public function get Path ( ) : String;
public function set Path ( String );
The virtual path to transmit with the cookie. The default is the path of the current request.
The Path property extends the Domain property to completely describe the specific URL that the cookie applies to. For example, in the URL http:/www.microsoft.com/asp, the domain is www.microsoft.com and the path is/asp.
The following example sets the path property of a new cookie.
[ VB ]
myCookie.Path = "/asp"
[ C# ]
myCookie.Path = "/asp";
HttpCookie Members