HttpPostedFile.ContentType プロパティ
アセンブリ: System.Web (system.web.dll 内)


アップロードされたファイル コレクション内のすべてのファイルをループし、ファイルの MIME タイプが US-ASCII である場合にアクションを実行する方法を次のコード例に示します。
Dim Loop1 As Integer Dim MyFileCollection As HttpFileCollection = Request.Files For Loop1 = 0 To MyFileCollection.Count - 1 If MyFileCollection(Loop1).ContentType = "video/mpeg" Then '... End If Next Loop1
HttpFileCollection MyFileCollection = Request.Files; for (int Loop1 = 0; Loop1 < MyFileCollection.Count; Loop1++) { if (MyFileCollection[Loop1].ContentType == "video/mpeg") { //... } }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からHttpPostedFile.ContentType プロパティを検索する場合は、下記のリンクをクリックしてください。

- HttpPostedFile.ContentType プロパティのページへのリンク