HttpCookie.Values Özellik

Tanım

Tek bir tanımlama bilgisi nesnesi içinde yer alan anahtar/değer çiftleri koleksiyonunu alır.Gets a collection of key/value pairs that are contained within a single cookie object.

public:
 property System::Collections::Specialized::NameValueCollection ^ Values { System::Collections::Specialized::NameValueCollection ^ get(); };
public System.Collections.Specialized.NameValueCollection Values { get; }
member this.Values : System.Collections.Specialized.NameValueCollection
Public ReadOnly Property Values As NameValueCollection

Özellik Değeri

NameValueCollection

Tanımlama bilgisi değerleri koleksiyonu.A collection of cookie values.

Örnekler

Aşağıdaki kod örneği yeni bir tanımlama bilgisi oluşturur ve buna birkaç değer ekler.The following code example creates a new cookie and adds several values to it. Bir tanımlama bilgisinden birden çok değerin ayıklanmasına ilişkin bir örnek için bkz HasKeys ..For an example of how to extract multiple values from one cookie, see HasKeys.

HttpCookie MyCookie = new HttpCookie("Cookie1");
 MyCookie.Values["Val1"] = "1";
 MyCookie.Values["Val2"] = "2";
 MyCookie.Values["Val3"] = "3";
 Response.Cookies.Add(MyCookie);

Dim MyCookie As HttpCookie = New HttpCookie("Cookie1")
 MyCookie.Values("Val1") = "1"
 MyCookie.Values("Val2") = "2"
 MyCookie.Values("Val3") = "3"
 Response.Cookies.Add(MyCookie)
    

Şunlara uygulanır

Ayrıca bkz.