HttpRequest.AcceptTypes Property
.NET Framework 3.0
Gets a string array of client-supported MIME accept types.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
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 valueto a separate line of HTTP output.
int indx;
String arr[] = get_Request().get_AcceptTypes();
for (indx = 0; indx < arr.length; indx++) {
get_Response().Write(("Accept Type " + indx + ": "
+ arr.get_Item(indx) + "<br>"));
}
var arr : String[] = Request.AcceptTypes for(var i=0; i < arr.Length; i++){ Response.Write("Accept Type " + i + ": " + arr[i] + "<br>") }
Community Additions
ADD
Show: