New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(MaterialRipple))]
[ClientScriptResource("Telerik.Web.UI.RadCloudUpload", "Telerik.Web.UI.CloudUpload.RadCloudUploadScripts.js")]
[TelerikToolboxCategory("Upload")]
[ToolboxBitmap(typeof(RadCloudUpload), "Toolbox.Icons.CloudUpload.png")]
[EmbeddedSkin("CloudUpload", typeof(RadCloudUpload))]
[EmbeddedSkin("CloudUpload", "Default", typeof(RadCloudUpload))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadCloudUpload))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
public class RadCloudUpload : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl

Inheritance: objectControlWebControlRadWebControlRadCloudUpload

Implements: IAttributeAccessorIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorIParserAccessorIPostBackDataHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.LoadViewState(object)WebControl.TrackViewState()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.SaveViewState()WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipWebControl.WidthControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.OnInit(EventArgs)Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.CreateChildControls()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadCloudUpload()

Properties

Gets or sets the allowed file extensions for uploading.

C#
[TypeConverter(typeof(ListConverter))]
[PersistenceMode(PersistenceMode.Attribute)]
[Bindable(true)]
public string[] AllowedFileExtensions { get; set; }
Property 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.

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

Example:
cs-api-definition
Dim allowedFileExtensions As String() = New String(2) {"zip", "doc", "config"}
RadCloudUpload1.AllowedFileExtensions = allowedFileExtensions

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadWebControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Gets or sets the selected culture. Localization strings will be loaded based on this value.

C#
public CultureInfo Culture { get; set; }
Property Value:

The culture.

Gets or sets the drop zones for upload.

C#
[TypeConverter(typeof(ListConverter))]
[PersistenceMode(PersistenceMode.Attribute)]
[Bindable(true)]
public string[] DropZones { get; set; }

The values of the property should be a valid jQuery selectors. E.g. class name or Id of html element.

Gets or sets a value indicating if RadCloudUpload should check for the Amazon, and Azure assemblies.

C#
public bool EnableAssembliesDetection { get; set; }

Gets or sets a value indicating if RadCloudUpload should check the Telerik.Web.UI.WebResource handler existence in the application configuration file.

C#
public bool EnableHandlerDetection { get; set; }

The check is not performed when custom handler is used.

Used to customize the appearance and position of the file list panel of the RadCloudUpload.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileListPanelSettings FileListPanelSettings { get; }

Specifies the URL of the HTTPHandler from which the image will be served

C#
public string HttpHandlerUrl { get; set; }
Exceptions: ArgumentException

Gets the localization.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public CloudUploadLocalization Localization { get; }
Property Value:

The localization.

Gets or sets a value indicating where RadCloudUpload will look for its .resx localization files.

C#
public string LocalizationPath { get; set; }
Property Value:

The localization path.

Gets or sets the maximum file size allowed for uploading in bytes.

C#
[PersistenceMode(PersistenceMode.Attribute)]
[Bindable(true)]
public long MaxFileSize { get; set; }
Property Value:

The default value is 0 (unlimited).

Set this property to 0 in order to prevent the file size checking.

Specifies whether RadCloudUpload allows selecting multiple files in the File Selection dialog.

C#
public MultipleFileSelection MultipleFileSelection { get; set; }
Property Value:

The default value is Disabled

Setting the MultipleFileSelection property to Automatic means that RadCloudUpload will check the client's browser capabilities and if there is support for multiple file selection he will enable it. If there is no such support, the selection type would be still single.

Gets or sets the name of the client-side function which will be executed after a file is selected

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientFileSelected { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed after files are selected.

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientFilesSelecting { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed after files is being uploaded. It is applicable when MultipleFileSelection is available and many files are selected at once.

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientFilesUploaded { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed after a file is being uploaded.

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploaded { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed before a file is being uploaded.

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploading { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed when file is removed from uloaded/invalid files collections.

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploadRemoved { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed when file is going to be removed from uloaded/invalid files collections.

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploadRemoving { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed after the control is loaded

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientLoad { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed when file upload failed.

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientUploadFailed { get; set; }
Property Value:

The default value is string.Empty.

Gets or sets the name of the client-side function which will be executed when file validation failed (by size/type).

C#
[Browsable(true)]
[Bindable(true)]
public string OnClientValidationFailed { get; set; }
Property Value:

The default value is string.Empty.

Get or sets the provider used by the RadCloudUpload.

C#
public virtual ProviderType ProviderType { get; set; }

The property should be set to one of the existing providers otherwise an exception will be thrown.

C#
protected override bool SupportsRenderingMode { get; }

Overrides: RadWebControl.SupportsRenderingMode

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets a collection with information about the uploaded files.

C#
[Browsable(false)]
public CloudUploadFileInfoCollection UploadedFiles { get; }

Methods

C#
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadWebControl.AddAttributesToRender(HtmlTextWriter)

C#
protected virtual void CheckCloudUploadConfiguration()
C#
protected virtual void CheckForAssemblyReferences()

This method should return object that implements ICloudUploadRenderer or Inherits the CloudUploadRenderer class.

C#
protected override IRenderer CreateControlRenderer()
Returns:

IRenderer

Overrides: RadWebControl.CreateControlRenderer()

C#
protected override void DescribeComponent(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeComponent(IScriptDescriptor)

Executed when post data is loaded from the request

C#
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Parameters:postDataKeystringpostCollectionNameValueCollectionReturns:

bool

Overrides: RadWebControl.LoadPostData(string, NameValueCollection)

C#
protected virtual void OnCloudUploadedFile(CloudFileUploadedEventArgs eventArgs)
Parameters:eventArgsCloudFileUploadedEventArgs
C#
protected override void OnPreRender(EventArgs e)
Parameters:eEventArgs

Overrides: RadWebControl.OnPreRender(EventArgs)

Executed when post data changes should invoke a changed event

C#
protected override void RaisePostDataChangedEvent()

Overrides: RadWebControl.RaisePostDataChangedEvent()

C#
protected override void RenderContents(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadWebControl.RenderContents(HtmlTextWriter)

Events

Occurs once for each of the uploaded files after a postback.

C#
public event CloudFileUploadedEventHandler FileUploaded