RadUpload for ASP.NET

RadUpload Send comments on this topic.
AllowedFileExtensions Property
See Also  Example
Telerik.WebControls Namespace > RadUpload Class : AllowedFileExtensions Property


Gets or sets the allowed file extensions for uploading.   

 

Namespace: Telerik.WebControls
Assembly: RadUpload (in RadUpload.dll)

Syntax

Visual Basic (Declaration) 
Public Property AllowedFileExtensions As String()
Visual Basic (Usage)Copy Code
Dim instance As RadUpload
Dim value() As String
 
instance.AllowedFileExtensions = value
 
value = instance.AllowedFileExtensions
C# 
public string[] AllowedFileExtensions {get; set;}

Return Value

The default value is empty string array. In order to check for multiple file extensions you should set an array of strings containing the allowed file extensions for uploading.

Example

This example demonstrates how to set multiple allowed file extensions in a RadUpload control.
Visual BasicCopy Code
Dim allowedFileExtensions As String() = New String(2) {".zip", ".doc", ".config"}
RadUpload1.AllowedFileExtensions = allowedFileExtensions
C#Copy Code
string[] allowedFileExtensions = new string[3] {".zip", ".doc", ".config"};
RadUpload1.AllowedFileExtensions = allowedFileExtensions;
    

Remarks

Set this property to empty array of strings in order to prevent the file extension checking.

Note that the file extensions must include the dot before the actual extension. See the example below.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also