Skip to main content
Version: 4.1

SaveFileDialog

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Prompts the user to select a location for saving a file on the server.

public class SaveFileDialog : FileDialog

You can:

You must add at least one IFileSystemProvider to the Roots collection before showing the dialog.

Constructors

Instance member SaveFileDialog()

Initializes a new instance of SaveFileDialog.

Instance member SaveFileDialog(container)

Initializes a new instance of the SaveFileDialog extender with a specified container.

NameTypeDescription
containerIContainerAn IContainer that represents the container of the SaveFileDialog component.

Properties

Instance member CreatePrompt

Boolean: Returns or sets a value indicating whether the dialog box prompts the user for permission to create a file, if the file specified file does not exist. (Default: False)

Instance member OverwritePrompt

Boolean: Returns or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that already exists. (Default: True)

Methods

Instance member OpenFile()

Opens the file with read/write permission selected by the user.

Returns: Stream. A Stream that specifies the read/write file selected by the user.

Throws:

Instance member ProcessFileNames(fileNames)

Receives the file names selected by the user and validates them according to the properties set in the FileDialog instance.

ParameterTypeDescription
fileNamesString[]Array containing the selected file paths.

Returns: Boolean. True if the files have been validated and the dialog can close; otherwise false to keep the dialog open.

Protected member PromptFileCreate(fileName)

Asks the user's permission to create the specified fileName .

ParameterTypeDescription
fileNameStringFile name to create.

Returns: Boolean. True if the user confirms to create the file.

Protected member PromptFileOverwrite(fileName)

Asks the user's permission to overwrite the specified fileName .

ParameterTypeDescription
fileNameStringFile name to overwrite.

Returns: Boolean. True if the user confirms to overwrite the file.

Instance member Reset()

Resets all dialog box options to their default values.