Search Results for

Show / Hide Table of Contents

# Class UploadAttachments

Legacy attachment-list control compatibility wrapper built on top of AjaxAttachments.

##### Inheritance

object
Control
WebControl
AjaxAttachments
UploadAttachments

##### Implements

IComponent
IDisposable
IParserAccessor
IUrlResolutionService
IDataBindingsAccessor
IControlBuilderAccessor
IControlDesignerAccessor
IExpressionsAccessor
IAttributeAccessor
IPostBackDataHandler

##### Inherited Members

AjaxAttachments.MaxFiles
AjaxAttachments.Extensions
AjaxAttachments.MaxSize
AjaxAttachments.UploadUrl
AjaxAttachments.ShowSize
AjaxAttachments.Removable
AjaxAttachments.OnClientChange
AjaxAttachments.ButtonText
AjaxAttachments.UploadedFileGuids
AjaxAttachments.LoadPostData(string, NameValueCollection)
WebControl.AddAttributesToRender(HtmlTextWriter)
WebControl.ApplyStyle(Style)
WebControl.CopyBaseAttributes(WebControl)
WebControl.CreateControlStyle()
WebControl.LoadViewState(object)
WebControl.TrackViewState()
WebControl.MergeStyle(Style)
WebControl.RenderBeginTag(HtmlTextWriter)
WebControl.RenderEndTag(HtmlTextWriter)
WebControl.RenderContents(HtmlTextWriter)
WebControl.SaveViewState()
WebControl.AccessKey
WebControl.Attributes
WebControl.BackColor
WebControl.BorderColor
WebControl.BorderWidth
WebControl.BorderStyle
WebControl.ControlStyle
WebControl.ControlStyleCreated
WebControl.CssClass
WebControl.DisabledCssClass
WebControl.Style
WebControl.Enabled
WebControl.EnableTheming
WebControl.Font
WebControl.ForeColor
WebControl.HasAttributes
WebControl.Height
WebControl.IsEnabled
WebControl.SupportsDisabledAttribute
WebControl.SkinID
WebControl.TabIndex
WebControl.TagKey
WebControl.TagName
WebControl.ToolTip
WebControl.Width
Control.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.ClientIDMode
Control.ClientID
Control.ClientIDSeparator
Control.Context
Control.Adapter
Control.DesignMode
Control.Events
Control.ID
Control.IsChildControlStateCleared
Control.EnableViewState
Control.ViewStateMode
Control.IsViewStateEnabled
Control.NamingContainer
Control.IdSeparator
Control.LoadViewStateByID
Control.Page
Control.RenderingCompatibility
Control.TemplateControl
Control.Parent
Control.TemplateSourceDirectory
Control.AppRelativeTemplateSourceDirectory
Control.Site
Control.Visible
Control.UniqueID
Control.HasChildViewState
Control.Controls
Control.ValidateRequestMode
Control.ViewState
Control.ViewStateIgnoresCase
Control.ChildControlsCreated
Control.IsTrackingViewState
Control.Disposed
Control.DataBinding
Control.Init
Control.Load
Control.PreRender
Control.Unload
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: CuteWebUI

###### Assembly: AjaxUploader.dll

##### Syntax

    public class UploadAttachments : AjaxAttachments, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IPostBackDataHandler

### Constructors

#### UploadAttachments()

Initializes a new instance of the UploadAttachments class.

##### Declaration

    public UploadAttachments()

### Properties

#### ActionButtonBehavior

##### Declaration

    public AttachmentItemBehavior ActionButtonBehavior { get; set; }

##### Property Value

Type | Description
--- | ---
AttachmentItemBehavior |

#### ActionButtonText

##### Declaration

    public string ActionButtonText { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### ActionHeaderText

##### Declaration

    public string ActionHeaderText { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### AttachmentTRStyle

##### Declaration

    public string AttachmentTRStyle { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### AttachmentTableStyle

##### Declaration

    public string AttachmentTableStyle { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### CustomProvider

Gets or sets a custom provider used to surface externally managed attachments.

##### Declaration

    public IAttachmentProvider CustomProvider { get; set; }

##### Property Value

Type | Description
--- | ---
IAttachmentProvider |

#### DropZoneID

##### Declaration

    public string DropZoneID { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### HeaderRowStyle

##### Declaration

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public TableItemStyle HeaderRowStyle { get; }

##### Property Value

Type | Description
--- | ---
TableItemStyle |

#### HideNoItemTable

##### Declaration

    public bool HideNoItemTable { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### InsertButton

Gets the underlying legacy browse button control.

##### Declaration

    [Browsable(false)]
    public Button InsertButton { get; }

##### Property Value

Type | Description
--- | ---
Button |

#### InsertButtonStyle

Gets the style applied to the legacy browse button.

##### Declaration

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public Style InsertButtonStyle { get; }

##### Property Value

Type | Description
--- | ---
Style |

#### InsertText

Gets or sets the caption of the legacy attachment browse button.

##### Declaration

    public string InsertText { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### ItemCellStyle

##### Declaration

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public TableItemStyle ItemCellStyle { get; }

##### Property Value

Type | Description
--- | ---
TableItemStyle |

#### ItemCheckStyle

##### Declaration

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public Style ItemCheckStyle { get; }

##### Property Value

Type | Description
--- | ---
Style |

#### ItemTemplate

Gets or sets the custom template used to render legacy attachment items.

##### Declaration

    [TemplateContainer(typeof(AttachmentItem))]
    [PersistenceMode(PersistenceMode.InnerProperty)]
    public ITemplate ItemTemplate { get; set; }

##### Property Value

Type | Description
--- | ---
ITemplate |

#### ItemTemplatePosition

##### Declaration

    public AttachmentItemTemplatePosition ItemTemplatePosition { get; set; }

##### Property Value

Type | Description
--- | ---
AttachmentItemTemplatePosition |

#### Items

Gets the legacy attachment item collection.

##### Declaration

    [Browsable(false)]
    public AttachmentItemCollection Items { get; }

##### Property Value

Type | Description
--- | ---
AttachmentItemCollection |

#### ManualStartUpload

##### Declaration

    public bool ManualStartUpload { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### MultipleFilesUpload

##### Declaration

    public bool MultipleFilesUpload { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### RemoveButtonBehavior

##### Declaration

    public AttachmentItemBehavior RemoveButtonBehavior { get; set; }

##### Property Value

Type | Description
--- | ---
AttachmentItemBehavior |

#### RemoveButtonText

##### Declaration

    public string RemoveButtonText { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### RemoveHeaderText

##### Declaration

    public string RemoveHeaderText { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### ShowActionButtons

##### Declaration

    public bool ShowActionButtons { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### ShowCheckBoxes

##### Declaration

    public bool ShowCheckBoxes { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### ShowFileIcons

##### Declaration

    public bool ShowFileIcons { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### ShowQueueTable

##### Declaration

    public bool ShowQueueTable { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### ShowRemoveButtons

##### Declaration

    public bool ShowRemoveButtons { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### ShowRemoveButtonsAsText

##### Declaration

    public bool ShowRemoveButtonsAsText { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### ShowTableHeader

##### Declaration

    public bool ShowTableHeader { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### TableHeaderTemplate

##### Declaration

    public string TableHeaderTemplate { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### TableStyle

##### Declaration

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public TableStyle TableStyle { get; }

##### Property Value

Type | Description
--- | ---
TableStyle |

#### TemplateHeaderText

##### Declaration

    public string TemplateHeaderText { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### UploadType

##### Declaration

    public UploadType UploadType { get; set; }

##### Property Value

Type | Description
--- | ---
UploadType |

#### ValidateOption

Gets the legacy attachment validation settings.

##### Declaration

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public UploaderValidateOption ValidateOption { get; }

##### Property Value

Type | Description
--- | ---
UploaderValidateOption |

### Methods

#### AddCustomAttachment(Guid)

Adds an externally managed attachment through CustomProvider.

##### Declaration

    public void AddCustomAttachment(Guid fileguid)

##### Parameters

Type | Name | Description
--- | --- | ---
Guid | fileguid |

#### DeleteAllAttachments()

Deletes every attachment in the current collection.

##### Declaration

    public void DeleteAllAttachments()

#### DeleteAttachment(int)

Deletes the attachment at the specified index.

##### Declaration

    public void DeleteAttachment(int index)

##### Parameters

Type | Name | Description
--- | --- | ---
int | index |

#### DeleteUncheckedAttachments()

Deletes all unchecked attachments.

##### Declaration

    public void DeleteUncheckedAttachments()

#### GetAttachmentCount()

Returns the number of currently visible attachment items.

##### Declaration

    public int GetAttachmentCount()

##### Returns

Type | Description
--- | ---
int |

#### GetItemsTable()

Gets the internal table-like container used by the legacy control.

##### Declaration

    public WebControl GetItemsTable()

##### Returns

Type | Description
--- | ---
WebControl |

#### OnAttachmentActionClicked(AttachmentItemEventArgs)

##### Declaration

    protected virtual void OnAttachmentActionClicked(AttachmentItemEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
AttachmentItemEventArgs | args |

#### OnAttachmentAdded(AttachmentItemEventArgs)

##### Declaration

    protected virtual void OnAttachmentAdded(AttachmentItemEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
AttachmentItemEventArgs | args |

#### OnAttachmentCheckChanged(AttachmentItemEventArgs)

##### Declaration

    protected virtual void OnAttachmentCheckChanged(AttachmentItemEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
AttachmentItemEventArgs | args |

#### OnAttachmentCreated(AttachmentItemEventArgs)

##### Declaration

    protected virtual void OnAttachmentCreated(AttachmentItemEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
AttachmentItemEventArgs | args |

#### OnAttachmentDataBound(AttachmentItemEventArgs)

##### Declaration

    protected virtual void OnAttachmentDataBound(AttachmentItemEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
AttachmentItemEventArgs | args |

#### OnAttachmentHided(AttachmentItemEventArgs)

##### Declaration

    protected virtual void OnAttachmentHided(AttachmentItemEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
AttachmentItemEventArgs | args |

#### OnAttachmentRemoveClicked(AttachmentItemEventArgs)

##### Declaration

    protected virtual void OnAttachmentRemoveClicked(AttachmentItemEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
AttachmentItemEventArgs | args |

#### OnFileUploaded(UploaderEventArgs)

##### Declaration

    protected virtual void OnFileUploaded(UploaderEventArgs args)

##### Parameters

Type | Name | Description
--- | --- | ---
UploaderEventArgs | args |

#### OnPreRender(EventArgs)

Raises the PreRender event.

##### Declaration

    protected override void OnPreRender(EventArgs e)

##### Parameters

Type | Name | Description
--- | --- | ---
EventArgs | e | An EventArgs object that contains the event data.

##### Overrides

AjaxAttachments.OnPreRender(EventArgs)

#### RaisePostDataChangedEvent()

Raises post-data changed notifications for the attachment control. This implementation is intentionally empty; inspect UploadedFileGuids during page processing.

##### Declaration

    public override void RaisePostDataChangedEvent()

##### Overrides

AjaxAttachments.RaisePostDataChangedEvent()

#### Render(HtmlTextWriter)

Renders the control to the specified HTML writer.

##### Declaration

    protected override void Render(HtmlTextWriter writer)

##### Parameters

Type | Name | Description
--- | --- | ---
HtmlTextWriter | writer | The HtmlTextWriter object that receives the control content.

##### Overrides

AjaxAttachments.Render(HtmlTextWriter)

#### Upload(int, string, Stream)

##### Declaration

    public void Upload(int filesize, string filename, Stream stream)

##### Parameters

Type | Name | Description
--- | --- | ---
int | filesize |
string | filename |
Stream | stream |

#### Upload(int, string, string)

##### Declaration

    public void Upload(int filesize, string filename, string temppath)

##### Parameters

Type | Name | Description
--- | --- | ---
int | filesize |
string | filename |
string | temppath |

### Events

#### AttachmentActionClicked

Occurs when the action button is clicked for an attachment item.

##### Declaration

    public event AttachmentItemEventHandler AttachmentActionClicked

##### Event Type

Type | Description
--- | ---
AttachmentItemEventHandler |

#### AttachmentAdded

Occurs when an attachment item is added to the collection.

##### Declaration

    public event AttachmentItemEventHandler AttachmentAdded

##### Event Type

Type | Description
--- | ---
AttachmentItemEventHandler |

#### AttachmentCheckChanged

Occurs when an attachment item's checked state changes.

##### Declaration

    public event AttachmentItemEventHandler AttachmentCheckChanged

##### Event Type

Type | Description
--- | ---
AttachmentItemEventHandler |

#### AttachmentCreated

Occurs when an attachment item object is created.

##### Declaration

    public event AttachmentItemEventHandler AttachmentCreated

##### Event Type

Type | Description
--- | ---
AttachmentItemEventHandler |

#### AttachmentDataBound

Occurs when an attachment item is data-bound.

##### Declaration

    public event AttachmentItemEventHandler AttachmentDataBound

##### Event Type

Type | Description
--- | ---
AttachmentItemEventHandler |

#### AttachmentHided

Occurs when an attachment item is hidden.

##### Declaration

    public event AttachmentItemEventHandler AttachmentHided

##### Event Type

Type | Description
--- | ---
AttachmentItemEventHandler |

#### AttachmentRemoveClicked

Occurs when the remove action is triggered for an attachment item.

##### Declaration

    public event AttachmentItemEventHandler AttachmentRemoveClicked

##### Event Type

Type | Description
--- | ---
AttachmentItemEventHandler |

#### FileUploaded

Occurs after a file is uploaded into the attachment list.

##### Declaration

    public event UploaderEventHandler FileUploaded

##### Event Type

Type | Description
--- | ---
UploaderEventHandler |

### Implements

IComponent
IDisposable
IParserAccessor
IUrlResolutionService
IDataBindingsAccessor
IControlBuilderAccessor
IControlDesignerAccessor
IExpressionsAccessor
IAttributeAccessor
IPostBackDataHandler