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。