HttpPostedFile.SaveAs メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HttpPostedFile.SaveAs メソッドの意味・解説 

HttpPostedFile.SaveAs メソッド

アップロードされたファイル内容保存します

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
使用例使用例

クライアントによってアップロードされたすべてのファイルを、Web サーバーローカル ディスクの C:\TempFiles フォルダ保存する方法次のコード例示します

Dim Loop1 As Integer
 Dim TempFileName As String
 Dim MyFileCollection As HttpFileCollection
 = Request.Files
 
 For Loop1 = 0 To MyFileCollection.Count -
 1
    ' Create a new file name.
    TempFileName = "C:\TempFiles\File_" & CStr(Loop1)
    ' Save the file.
    MyFileCollection(Loop1).SaveAs(TempFileName)
 Next Loop1
   
String TempFileName;
 HttpFileCollection MyFileCollection = Request.Files;
 
 for (int Loop1 = 0; Loop1 < MyFileCollection.Count;
 Loop1++)
 {
    // Create a new file name.
    TempFileName = "C:\\TempFiles\\File_" + Loop1.ToString();
    // Save the file.
    MyFileCollection[Loop1].SaveAs(TempFileName);
 }
   
String tempFileName;
HttpFileCollection myFileCollection = get_Request().get_Files();

for (int loop1 = 0; loop1 < myFileCollection.get_Count();
 loop1++) {
    // Create a new file name.
    tempFileName = "C:\\TempFiles\\File_" + String.valueOf(loop1);
    // Save the file.
    myFileCollection.get_Item(loop1).SaveAs(tempFileName);
}
var tempFileName : String
var myFileCollection : HttpFileCollection = Request.Files

for(var i=0; i < myFileCollection.Count;
 i++){
  // Create a new file name.
  tempFileName = "C:\TempFiles\File_" + i
  // Save the file.
  myFileCollection[i].SaveAs(tempFileName)
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からHttpPostedFile.SaveAs メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHttpPostedFile.SaveAs メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHttpPostedFile.SaveAs メソッド を検索

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

辞書ショートカット

すべての辞書の索引

HttpPostedFile.SaveAs メソッドのお隣キーワード
検索ランキング

   

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



HttpPostedFile.SaveAs メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS