ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - File Upload - Client side

Obout.Ajax.UI.FileUpload.FileUpload class

 Inheritance Hierarchy

It is a client-side representation of the server-side Obout.Ajax.UI.FileUpload.FileUpload class.
Note Note
To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as validFileExtensions, you call the get_validFileExtensions or set_validFileExtensions methods:
var uploaderObject = $find("<%= uploader1.ClientID %>");
var _validFileExtensions = uploaderObject.get_validFileExtensions();
...
uploaderObject.set_validFileExtensions("gif;jpeg;jpg");

Properties

Name Description
propertyisFinished boolean. Gets a value indicating whether the uplading is complete.
propertyisInProgress boolean. Gets a value indicating whether the uplading is in progress.
propertymaximumFileSize number. Gets or sets the maximum size (in kB) of the file for uploading.
Default 0 - any size is allowed.
propertymaximumTotalFileSize number. Gets or sets the maximum total size (in kB) of files for uploading.
Default 0 - any size is allowed.
propertyvalidFileExtensions string. Gets or sets valid extensions of files (separated with ';').
Default empty string (all files are allowed).

Static methods

Name Description
methodObout.Ajax.UI.FileUpload.FormatBytes(size) string. Returns the size in human readable form.
Note Note
To add or remove handler functions for client API events, you must call methods that are named with the add_ and remove_ prefixes. For example, to add or remove a handler function for an event such as filesPicked, you call the add_filesPicked or remove_filesPicked methods:
function filesPickedHandler(sender, args) {
  if (args.get_files().length > 5) {
      alert("Too many files selected: " + args.get_files().length);
      args.set_cancel(true);
  }
}
...
var uploaderObject = $find("<%= uploader1.ClientID %>");
uploaderObject.add_filesPicked(filesPickedHandler);
...
uploaderObject.remove_filesPicked(filesPickedHandler);

Events

Name Description
propertybeforeUpload Raised just before files transfer started.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.
propertyfilesPicked Raised when files where selected from the files browser.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.
propertyafterServerResponse Raised when the server acknowledges receipt of all files.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.
propertytransferFinished Raised when all files have been transfered.
Event's argument has type Obout.Ajax.UI.FileUpload.FilesUploadArgs.

"We are a current owner of the Infragistics suite - but will be immediately purchasing your components as they are far and away better than anything I have seen out there. Great stuff! I can't believe I haven't come across your components before."

David Adams
NJS Enterprises, Inc.

Random testimonial   All testimonials