WFFileAttachment

The implementation of this Web Control uploads a single file, either to the system directory or SharePoint during run time.

If the file already exists, information about the file is shown and the delete option is presented.

Properties

Field Name Definition
BindingName

The BindingName property allows you to type in a name that becomes the custom attribute name. You can also select the XPath of the data element contained within the XML Schema file for which to bind this control.

Click on the BindingName property, the Select XPath from XML Schema window appears.

Choose an XPath node for which to bind and click OK.

FileExtension

Determines the file extension type (e.g. .jpg, .jpg, .doc). If this property is left null, it matches any type of file.

Location

When uploading a file to the File System, the default path is set to the root directory. A relative path is accepted (e.g. /DirectoryName). If you forget to type the full path, the file will automatically be uploaded to the root directory.

When uploading to SharePoint, enter the SharePoint URL (e.g.: http: //[hostname]:8080/DemoDirectory).

OverWrite

Determines whether the file will be overwritten if it already exists.

Repository

Staging area for the file.

Inherits

  • System.Web.UI.Design.ControlDesigner

Usage

  • As a general rule do not use the & character in file names. If the uploading file name contains an "&" character, it will be changed to "_", because the "&" is the XML parser's primary key.
  • The user who uploaded the file is the only user who can see the information in the file or delete the file.
  • An empty file cannot be uploaded.