Class AsyncFileUpload
- Namespace
- AjaxControlToolkit
- Assembly
- AjaxControlToolkit.dll
[RequiredScript(typeof(CommonToolkitScripts))]
[ClientScriptResource("Sys.Extended.UI.AsyncFileUpload", "AsyncFileUpload")]
public class AsyncFileUpload : ScriptControlBase, INamingContainer, IControlResolver, IPostBackDataHandler, ICallbackEventHandler, IClientStateManager
- Inheritance
-
AsyncFileUpload
- Implements
-
INamingContainer
IPostBackDataHandler
ICallbackEventHandler
- Inherited Members
-
Constructors
Properties
[TypeConverter(typeof(WebColorConverter))]
public Color CompleteBackColor { get; set; }
Property Value
- Color
ContentType
[Browsable(false)]
public string ContentType { get; }
Property Value
- string
[TypeConverter(typeof(WebColorConverter))]
public Color ErrorBackColor { get; set; }
Property Value
- Color
[Browsable(false)]
public bool FailedValidation { get; set; }
Property Value
- bool
[Browsable(false)]
public byte[] FileBytes { get; }
Property Value
- byte[]
FileContent
[Browsable(false)]
public Stream FileContent { get; }
Property Value
- Stream
[Browsable(false)]
public string FileName { get; }
Property Value
- string
[Browsable(false)]
public bool HasFile { get; }
Property Value
- bool
[Browsable(false)]
public bool IsUploading { get; }
Property Value
- bool
[ExtenderControlEvent]
[ClientPropertyName("uploadComplete")]
public string OnClientUploadComplete { get; set; }
Property Value
- string
[ExtenderControlEvent]
[ClientPropertyName("uploadError")]
public string OnClientUploadError { get; set; }
Property Value
- string
[ExtenderControlEvent]
[ClientPropertyName("uploadStarted")]
public string OnClientUploadStarted { get; set; }
Property Value
- string
[Bindable(true)]
[Browsable(true)]
public bool PersistFile { get; set; }
Property Value
- bool
PostedFile
[Browsable(false)]
public HttpPostedFile PostedFile { get; }
Property Value
- HttpPostedFile
public string ThrobberID { get; set; }
Property Value
- string
[Bindable(true)]
[Browsable(true)]
public AsyncFileUploaderStyle UploaderStyle { get; set; }
Property Value
- AsyncFileUploaderStyle
[TypeConverter(typeof(WebColorConverter))]
public Color UploadingBackColor { get; set; }
Property Value
- Color
public override Unit Width { get; set; }
Property Value
- Unit
Methods
public void ClearAllFilesFromPersistedStore()
public void ClearFileFromPersistedStore()
protected override void CreateChildControls()
protected override Style CreateControlStyle()
Returns
- Style
protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
Parameters
descriptor
ScriptComponentDescriptor
protected string GenerateHtmlInputFileControl(string lastFileName)
Parameters
lastFileName
string
Returns
- string
protected string GenerateHtmlInputHiddenControl()
Returns
- string
public byte[] GetBytesFromStream(Stream stream)
Parameters
stream
Stream
Returns
- byte[]
protected override void OnPreRender(EventArgs e)
Parameters
e
EventArgs
protected virtual void OnUploadedComplete(AsyncFileUploadEventArgs e)
Parameters
e
AsyncFileUploadEventArgs
protected virtual void OnUploadedFileError(AsyncFileUploadEventArgs e)
Parameters
e
AsyncFileUploadEventArgs
public void SaveAs(string fileName)
Parameters
fileName
string
Events
[Bindable(true)]
public event EventHandler<AsyncFileUploadEventArgs> UploadedComplete
Event Type
- EventHandler<AsyncFileUploadEventArgs>
[Bindable(true)]
public event EventHandler<AsyncFileUploadEventArgs> UploadedFileError
Event Type
- EventHandler<AsyncFileUploadEventArgs>