HttpRequest.AcceptTypes Özellik

Tanım

İstemci tarafından desteklenen MIME kabul türlerinden oluşan bir dize dizisi alır.

public:
 property cli::array <System::String ^> ^ AcceptTypes { cli::array <System::String ^> ^ get(); };
public string[] AcceptTypes { get; }
member this.AcceptTypes : string[]
Public ReadOnly Property AcceptTypes As String()

Özellik Değeri

String[]

İstemci tarafından desteklenen MIME kabul türlerinden oluşan bir dize dizisi.

Örnekler

Aşağıdaki kod örneği, özelliği tarafından AcceptTypes döndürülen birden çok değeri bir nesne değişkenine yakalar ve her değerin sayısını ve adını ayrı bir HTTP çıkışı satırına yazar.

int indx;

 String[] arr = Request.AcceptTypes;
 for (indx = 0; indx < arr.Length; indx++) {
    Response.Write("Accept Type " + indx +": " + arr[indx] + "<br>");
 }

Dim MyType() As String
 Dim Indx As Integer
 
 MyType = Request.AcceptTypes
 For Indx = 0 To MyType.GetUpperBound(0)
    Response.Write("Accept Type " & Cstr(Indx) & ": " & Cstr(MyType(Indx)) & "<br>")
 Next Indx
   

Şunlara uygulanır