System.ComponentModel.DataAnnotations.FileExtensionsAttribute.FileExtensionsAttribute C# (CSharp) Method

FileExtensionsAttribute() public method

Provide the allowed file extensions, seperated via "|" (or a comma, ","), defaults to "png|jpe?g|gif" with the defaul error message "The {0} field only accepts files with the following extensions: {1}
public FileExtensionsAttribute ( string allowedExtensions = "png,jpg,jpeg,gif" ) : System
allowedExtensions string Specify the allowe dextensions separated by | or comma ,
return System
        public FileExtensionsAttribute(string allowedExtensions = "png,jpg,jpeg,gif")
            : this("The {0} field only accepts files with the following extensions: {1}.", allowedExtensions)
        {
        }

Same methods

FileExtensionsAttribute::FileExtensionsAttribute ( string errorMessage, string allowedExtensions ) : System