System.Web.UI.HtmlControls Namespace HtmlInputFile Class
Sets or retrieves the maximum length of the name of the file, including its path, to upload from the client machine.
Inline |
<input type=file maxlength = intMax ... > |
Script |
HtmlInputFile.MaxLength [ = intMax ] |
intMax |
Integer specifying the maximum number of characters allowable for the file path. |
The property is read/write with no default value.
Use this property to specify a limit for the number of characters that can be entered for the path of the file to upload.
NOTE: Support for this property is browser dependent, and may not work for all browsers.
The below code shows how to declaratively set the MaxLength property to limit the number of characters the file path may contain.
<input type="file" id="myFileUploader" maxlength="30" runat="server"/>
Show me
HtmlInputFile Members