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

クライアントによってアップロードされたファイルのコレクションを表す HttpFileCollection オブジェクト。


Files コレクション内のすべてのファイルの名前を表示するコード例を次に示します。
Dim loop1 As Integer Dim arr1() As String Dim Files As HttpFileCollection Files = Request.Files ' Load File collection into HttpFileCollection variable. arr1 = Files.AllKeys ' This will get names of all files into a string array. for loop1 = 0 To arr1.GetUpperBound(0) Response.Write("File: " & Server.HtmlEncode(arr1(loop1)) & "<br>") Next loop1
int loop1; HttpFileCollection Files; Files = Request.Files; // Load File collection into HttpFileCollection variable. arr1 = Files.AllKeys; // This will get names of all files into a string array. for (loop1 = 0; loop1 < arr1.Length; loop1++) { Response.Write("File: " + Server.HtmlEncode(arr1[loop1]) + "<br>"); }
int loop1; HttpFileCollection files; files = get_Request().get_Files(); // Load File collection into // HttpFileCollection variable. arr1 = files.get_AllKeys(); // This will get names of all files into // a string array. for (loop1 = 0; loop1 < arr1.length; loop1++) { get_Response().Write(("File: " + get_Server().HtmlEncode(arr1[loop1]) + "<br>")); }
var files : HttpFileCollection = Request.Files // Load File collection into HttpFileCollection variable. var arr1 : String[] = files.AllKeys // This will get names of all files into a string array. for(var loop1 = 0; loop1 < arr1.Length; loop1++){ Response.Write("File: " + Server.HtmlEncode(arr1[loop1]) + "<br>") }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- HttpRequest.Files プロパティのページへのリンク