Gets or sets a comma-separated list of MIME encodings used to constrain the file types the user can select.
Namespace: System.Web.UI.HtmlControls Assembly: System.Web (in system.web.dll)
Use this property to specify the file type that can be uploaded to the server. For example, to restrict the selection to images, set this property to "image/*".
Note
Support for this property is browser-dependent. Check your browser to determine whether it supports this property.
The following code example demonstrates how to use the Accept property to restrict the user from selecting any file other than an image file. For this example to work properly, you need to create a directory called Temp on your computer's drive C.
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.