Search Results for

Show / Hide Table of Contents

# Class AttachmentItem

Represents one item in the legacy attachment collection.

##### Inheritance

object
Control
AttachmentItem

##### Implements

IComponent
IDisposable
IParserAccessor
IUrlResolutionService
IDataBindingsAccessor
IControlBuilderAccessor
IControlDesignerAccessor
IExpressionsAccessor
INamingContainer

##### Inherited Members

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.LoadViewState(object)
Control.MapPathSecure(string)
Control.OpenFile(string)
Control.OnLoad(EventArgs)
Control.OnPreRender(EventArgs)
Control.BuildProfileTree(string, bool)
Control.SaveControlState()
Control.SaveViewState()
Control.Render(HtmlTextWriter)
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.TrackViewState()
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.EnableTheming
Control.IsChildControlStateCleared
Control.SkinID
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.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 AttachmentItem : Control, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, INamingContainer

### Properties

#### Checked

Gets or sets whether the attachment is selected.

##### Declaration

    public bool Checked { get; set; }

##### Property Value

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

#### ClientData

Gets or sets custom client data associated with the attachment.

##### Declaration

    public string ClientData { get; set; }

##### Property Value

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

#### DataItem

##### Declaration

    public AttachmentItem DataItem { get; }

##### Property Value

Type | Description
--- | ---
AttachmentItem |

#### FileGuid

Gets the uploaded file GUID for this attachment.

##### Declaration

    public Guid FileGuid { get; }

##### Property Value

Type | Description
--- | ---
Guid |

#### FileName

Gets the display file name for this attachment.

##### Declaration

    public string FileName { get; }

##### Property Value

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

#### FileSize

Gets the file size in bytes.

##### Declaration

    public int FileSize { get; }

##### Property Value

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

#### IsCustom

Gets whether this item comes from a custom attachment provider.

##### Declaration

    public bool IsCustom { get; }

##### Property Value

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

#### ShouldSave

Gets whether the attachment should be persisted when the form is processed.

##### Declaration

    public bool ShouldSave { get; }

##### Property Value

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

#### Visible

Gets or sets whether the attachment is visible.

##### Declaration

    public bool Visible { get; set; }

##### Property Value

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

### Methods

#### ChangeToCustom(Guid)

##### Declaration

    public void ChangeToCustom(Guid newguid)

##### Parameters

Type | Name | Description
--- | --- | ---
Guid | newguid |

#### CopyTo(string)

##### Declaration

    public void CopyTo(string newpath)

##### Parameters

Type | Name | Description
--- | --- | ---
string | newpath |

#### Delete()

Deletes the attachment from the backing store and removes it from the collection.

##### Declaration

    public void Delete()

#### GetCustomData(string)

Gets a custom metadata value stored on the attachment.

##### Declaration

    public string GetCustomData(string key)

##### Parameters

Type | Name | Description
--- | --- | ---
string | key |

##### Returns

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

#### GetTempFilePath()

Gets the temporary file path when the underlying provider supports the file system.

##### Declaration

    public string GetTempFilePath()

##### Returns

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

#### HideAndUncheck()

##### Declaration

    public void HideAndUncheck()

#### MoveTo(string)

##### Declaration

    public void MoveTo(string newpath)

##### Parameters

Type | Name | Description
--- | --- | ---
string | newpath |

#### OpenStream()

Opens a readable stream for the attachment contents.

##### Declaration

    public Stream OpenStream()

##### Returns

Type | Description
--- | ---
Stream |

#### Remove()

##### Declaration

    public void Remove()

#### SetCustomData(string, string)

Stores a custom metadata value on the attachment.

##### Declaration

    public void SetCustomData(string key, string value)

##### Parameters

Type | Name | Description
--- | --- | ---
string | key |
string | value |

### Implements

IComponent
IDisposable
IParserAccessor
IUrlResolutionService
IDataBindingsAccessor
IControlBuilderAccessor
IControlDesignerAccessor
IExpressionsAccessor
INamingContainer