HttpPostedFile.ContentType プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HttpPostedFile.ContentType プロパティの意味・解説 

HttpPostedFile.ContentType プロパティ

クライアントから送信されファイルMIME コンテンツ タイプ取得します

名前空間: System.Web
アセンブリ: 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")
    {
       //...
    }
 }
    
HttpFileCollection myFileCollection = get_Request().get_Files();

for (int loop1 = 0; loop1 < myFileCollection.get_Count();
 loop1++) {
    if (myFileCollection.get_Item(loop1).get_ContentType().
        Equals("video/mpeg")) {
            //...
    }
}
var myFileCollection : HttpFileCollection = Request.Files

for(var i=0; i < myFileCollection.Count;
 i++){
  if(myFileCollection[i].ContentType == "video/mpeg"){
      //...
  }
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HttpPostedFile クラス
HttpPostedFile メンバ
System.Web 名前空間
FileName
HttpPostedFile.ContentLength プロパティ



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「HttpPostedFile.ContentType プロパティ」の関連用語

HttpPostedFile.ContentType プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HttpPostedFile.ContentType プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS