Share via


HttpPostedFile.FileName 속성

정의

클라이언트 파일의 정규화된 이름을 가져옵니다.

public:
 property System::String ^ FileName { System::String ^ get(); };
public string FileName { get; }
member this.FileName : string
Public ReadOnly Property FileName As String

속성 값

String

디렉터리 경로를 포함한 클라이언트 파일의 이름입니다.

예제

다음 코드 예제에서는 문자열 변수에 업로드 된 파일 (파일 컬렉션의 첫 번째 파일)의 이름을 지정 하는 방법에 설명 합니다.

HttpFileCollection MyFileColl = Request.Files;
 HttpPostedFile MyPostedFile = MyFileColl.Get(0);
 String MyFileName = MyPostedFile.FileName;
Dim MyFileColl As HttpFileCollection = Request.Files
 Dim MyPostedFile As HttpPostedFile = MyFileColl.Get(0)
 Dim MyFileName As String = MyPostedFile.FileName

적용 대상

추가 정보