HttpRequest.AcceptTypes Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a string array of client-supported MIME accept types.
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()
Property Value
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.
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
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για