asp.net.ph

HttpPostedFile.FileName Property

System.Web Namespace   HttpPostedFile Class


Gets the fully-qualified name of the file on the client's computer ( for example "C:\myFiles\Test.txt" ).

[ VB ]
Public ReadOnly Property FileName As String

[ C# ]
public string FileName {get;}

[ C++ ]
public: __property String* get_FileName ( );

[ JScript ]
public function get FileName ( ) : String;

Property Value

The name of the client's file.

Example

The following example shows the simplest way to retrieve and display the FileName property of an uploaded file. In the sample, an HtmlInputFile control named myUploader is used to enable selection of a file from the client's machine.

myUploader.PostedFile.FileName

 Show me 

See Also

HttpPostedFile Members   HttpFileCollection Class Skip Navigation Links


Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note