HttpRequest.AcceptTypes Property

Definition

Gets a string array of client-supported MIME accept types.

C#
public string[] AcceptTypes { get; }

Property Value

String[]

A string array of client-supported MIME accept types.

Examples

The following code example captures the multiple values returned by the AcceptTypes property into an object variable and writes the number and name of each value to a separate line of HTTP output.

C#
int indx;

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

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1