HttpCookie.Values Özellik

Tanım

Tek bir tanımlama bilgisi nesnesi içinde yer alan anahtar/değer çiftleri koleksiyonunu alır.

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.

Örnekler

Aşağıdaki kod örneği yeni bir tanımlama bilgisi oluşturur ve buna birkaç değer ekler. Bir tanımlama bilgisinden birden çok değeri ayıklama örneği için bkz 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.