HttpCookie.Path 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置使用当前 Cookie 传输的虚拟路径。
public:
property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };
public string Path { get; set; }
member this.Path : string with get, set
Public Property Path As String
属性值
使用 Cookie 传输的虚拟路径。 默认值 /为服务器根目录。
示例
下面的代码示例设置 Path 新 Cookie 的属性。
MyCookie.Path = "/asp";
MyCookie.Path = "/asp"
注解
该 Path 属性扩展 Domain 属性以完全描述 Cookie 应用到的特定 URL。 例如,在 URL http:/www.microsoft.com/asp中,域为 www.microsoft.com /asp,路径为 /asp。