Click or drag to resize

WorkflowFileUpload Class

This control is composed of 2 modes First is edit mode within you can upload or overwrite a file Second is display mode with uploaded file title You will be able to upload/modify and remove file only if control is not readonly
Inheritance Hierarchy

Namespace:  WorkflowGen.My.Web.UI.WebControls
Assembly:  WorkflowGen.My (in WorkflowGen.My.dll) Version: (
public class WorkflowFileUpload : WebControl, 

The WorkflowFileUpload type exposes the following members.

Public methodWorkflowFileUpload
Creates a new instance of the object WorkflowFileUpload
Public propertyAddImageUrl
The image url for Add and Replace
Public propertyAddStyle
Upload link style property
Public propertyAddText
Add link label property
Public propertyAllowedExtensions
Allowed extensions property
Public propertyAutoPostBack
If true, auto post back on file choice will be enabled
Public propertyCancelImageUrl
The image url for Cancel Replace
Public propertyCancelText
Cancel link label property
Public propertyControlsStyle
How the control is displayed to the user using the DisplayType enumeration
Public propertyCulture
Public propertyDeleteImageUrl
The image url for Delete
Public propertyDeleteStyle
Delete link style property
Public propertyDeleteText
Delete link label property
Public propertyDisplayMode
Display Mode property
Public propertyDownloadLink
If true, link on file download will be enabled
Public propertyDownloadStyle
Download link style property
Public propertyEmbedImagePreview
Source of the image/pdf preview in the form archive. If True, the whole image/pdf will be embedded in the form archive. If false, the image/pdf source will come from a URL to WorkflowGen.
Public propertyEmptyFileErrorMessage
Empty File Error Message property
Public propertyExtensionRestrictionErrorMessage
Forbidden File Extension Error Message property
Public propertyFileInfo
Return the FileInfo of the uploaded file if file exists Else return null
Public propertyFileName
Return the filename of the uploaded file
Public propertyFileSizeLimit
Maximum file size property
Public propertyFileSizeStyle
File size description style property
Public propertyForbiddenExtensions
Forbidden extensions property
Public propertyHasFile
Return true if a file has been uploaded
Public propertyHasPostedFile
Return true if a file has been posted
Public propertyModifyImageUrl
The image url for Cancel Replace
Public propertyModifyStyle
Modify link style property
Public propertyOverwriteText
Overwrite link label property
Public propertyPostedFile
Return the posted file
Public propertyPreviewImageHeight
Set the CSS height value for the image/pdf preview
Public propertyPreviewImagePosition
Choices: Top, Bottom
Public propertyPreviewImageStyle
Image preview style property
Public propertyPreviewImageWidth
Set the CSS width value for the image/pdf preview
Public propertyReadOnly
If true, control is in read only mode
Public propertyRequiredStyleWebControl
WebControl used for applying a required style
Public propertySeparatorStyle
Separator char style property
Public propertyShowFileSize
If true, control will display file size
Public propertyShowPreviewImage
If true, control will display the image or pdf preview when possible Supported file extensions are .bmp, .gif, .jpg, .jpeg, .png, .svg and .pdf
Public propertySizeRestrictionErrorMessage
Forbidden File Size Error Message property
Public propertyUpdateText
Update link label property
Public propertyUploadStyle
Upload control style property
Public propertyValidationValue
Returns the value for validation
Public propertyWidth
FileUpload Width
Public methodAttachFile(String)
Only if Extension is not forbidden AND Extension is allowed or all extensions are allowed AND File Size does not exceed Max Size
Public methodAttachFile(String, Stream)
Only if file stream does not exceed Max Size
Public methodChangeToFormArchiveLayout
Remove post backs and replace the download link and image source with an absolute URL to WFGEN Note: DownloadLink must be true and EmbedImagePreview false for their respective updates.
Protected methodCreateChildControls
Creates the constituents controls
(Overrides ControlCreateChildControls.)
Protected methodLoadControlState
Control state loading
(Overrides ControlLoadControlState(Object).)
Protected methodOnDataBinding
Init of the stateBag and public properties before the Page Load
(Overrides ControlOnDataBinding(EventArgs).)
Protected methodOnInit
(Overrides ControlOnInit(EventArgs).)
Protected methodOnLoad
Executed when control is loaded WorkflowFileUpload will first see if there is any new file in his storage directory If a file appeared WorkflowFileUpload will try to apply restriction rules (size limit and extensions) If the last created file is accepted then he'll delete others Else the control will see if another file was registered before the current load
(Overrides ControlOnLoad(EventArgs).)
Protected methodOnPreRender
Executed before the rendering Styles apply
(Overrides ControlOnPreRender(EventArgs).)
Protected methodOnUnload
Saving in the FormData
(Overrides ControlOnUnload(EventArgs).)
Public methodRemoveFile
Remove the file that is currently attached to the control
Protected methodRender
(Overrides WebControlRender(HtmlTextWriter).)
Protected methodSaveControlState
Control state saving Update Control State with FormData using context.xml
(Overrides ControlSaveControlState.)
Public eventOnFileDeleted
Declare an event with arguments we want to send
Public eventOnFileUploaded
Declare an event with arguments we want to send
See Also