Table of Contents

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

AsyncFileUpload()

public AsyncFileUpload()

Properties

CompleteBackColor

[TypeConverter(typeof(WebColorConverter))]
public Color CompleteBackColor { get; set; }

Property Value

Color

ContentType

[Browsable(false)]
public string ContentType { get; }

Property Value

string

ErrorBackColor

[TypeConverter(typeof(WebColorConverter))]
public Color ErrorBackColor { get; set; }

Property Value

Color

FailedValidation

[Browsable(false)]
public bool FailedValidation { get; set; }

Property Value

bool

FileBytes

[Browsable(false)]
public byte[] FileBytes { get; }

Property Value

byte[]

FileContent

[Browsable(false)]
public Stream FileContent { get; }

Property Value

Stream

FileName

[Browsable(false)]
public string FileName { get; }

Property Value

string

HasFile

[Browsable(false)]
public bool HasFile { get; }

Property Value

bool

IsUploading

[Browsable(false)]
public bool IsUploading { get; }

Property Value

bool

OnClientUploadComplete

[ExtenderControlEvent]
[ClientPropertyName("uploadComplete")]
public string OnClientUploadComplete { get; set; }

Property Value

string

OnClientUploadError

[ExtenderControlEvent]
[ClientPropertyName("uploadError")]
public string OnClientUploadError { get; set; }

Property Value

string

OnClientUploadStarted

[ExtenderControlEvent]
[ClientPropertyName("uploadStarted")]
public string OnClientUploadStarted { get; set; }

Property Value

string

PersistFile

[Bindable(true)]
[Browsable(true)]
public bool PersistFile { get; set; }

Property Value

bool

PostedFile

[Browsable(false)]
public HttpPostedFile PostedFile { get; }

Property Value

HttpPostedFile

ThrobberID

public string ThrobberID { get; set; }

Property Value

string

UploaderStyle

[Bindable(true)]
[Browsable(true)]
public AsyncFileUploaderStyle UploaderStyle { get; set; }

Property Value

AsyncFileUploaderStyle

UploadingBackColor

[TypeConverter(typeof(WebColorConverter))]
public Color UploadingBackColor { get; set; }

Property Value

Color

Width

public override Unit Width { get; set; }

Property Value

Unit

Methods

ClearAllFilesFromPersistedStore()

public void ClearAllFilesFromPersistedStore()

ClearFileFromPersistedStore()

public void ClearFileFromPersistedStore()

CreateChildControls()

protected override void CreateChildControls()

CreateControlStyle()

protected override Style CreateControlStyle()

Returns

Style

DescribeComponent(ScriptComponentDescriptor)

protected override void DescribeComponent(ScriptComponentDescriptor descriptor)

Parameters

descriptor ScriptComponentDescriptor

GenerateHtmlInputFileControl(string)

protected string GenerateHtmlInputFileControl(string lastFileName)

Parameters

lastFileName string

Returns

string

GenerateHtmlInputHiddenControl()

protected string GenerateHtmlInputHiddenControl()

Returns

string

GetBytesFromStream(Stream)

public byte[] GetBytesFromStream(Stream stream)

Parameters

stream Stream

Returns

byte[]

OnPreRender(EventArgs)

protected override void OnPreRender(EventArgs e)

Parameters

e EventArgs

OnUploadedComplete(AsyncFileUploadEventArgs)

protected virtual void OnUploadedComplete(AsyncFileUploadEventArgs e)

Parameters

e AsyncFileUploadEventArgs

OnUploadedFileError(AsyncFileUploadEventArgs)

protected virtual void OnUploadedFileError(AsyncFileUploadEventArgs e)

Parameters

e AsyncFileUploadEventArgs

SaveAs(string)

public void SaveAs(string fileName)

Parameters

fileName string

Events

UploadedComplete

[Bindable(true)]
public event EventHandler<AsyncFileUploadEventArgs> UploadedComplete

Event Type

EventHandler<AsyncFileUploadEventArgs>

UploadedFileError

[Bindable(true)]
public event EventHandler<AsyncFileUploadEventArgs> UploadedFileError

Event Type

EventHandler<AsyncFileUploadEventArgs>