SendBinary (Dundas Upload Control 2.0)

Dundas

SendBinary (Dundas Upload Control 2.0)

Overview | Properties | Methods

Call this method to download files from the server.

Syntax

 UploadObject.SendBinary(Path As String[, ContentType As String = "default"])

The SendBinary method syntax has the following part(s):

Part

Description

Path

The pathname of the file to be downloaded. Use either a relative or absolute pathname, depending on the setting of the UseVirtualDir property.

ContentType

The type of file to be downloaded.

 

Remarks

An exception is thrown if the operation fails. Trap for success/failure by examining VBScript's Err object immediately after calling this method (the Number property of the Err object will be a non-zero value if it failed). MAKE SURE that you have enabled inline error trapping by using an On Error Resume Next statement at the beginning of the ASP page.

If UseVirtualDir is set to TRUE then the specified path needs to be relative. It should start with a forward slash and be followed by a valid alias, and any sub-folders need to be separated with forward slashes. If you specify a physical pathname when UseVirtualDir is TRUE an exception will be thrown.

If you specify an empty content type the resulting Response.ContentType header is not set. If it is set to the default (which is "default") then the resulting content type header will be set to a value which corresponds to the associated file extension.

Please note that it is much more efficient to use the SaveToMemory method when calling SendBinary.

The data sent back to the client will constitute the contents of the resulting web page displayed in the client's browser.