SaveFileDialog.CreatePrompt Property


Gets or sets a value indicating whether the dialog box prompts the user for permission to create a file if the user specifies a file that does not exist.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member CreatePrompt : bool with get, set

Property Value

Type: System.Boolean

true if the dialog box prompts the user before creating a file if the user specifies a file name that does not exist; false if the dialog box automatically creates the new file without prompting the user for permission. The default value is false.

The following code example demonstrates using the RichTextBox.SaveFile and RichTextBox.LoadFile methods with streams. It also demonstrates using the FileName, DefaultExt, CreatePrompt, and OverwritePrompt members.

This is a complete example that is ready to run when you copy it to your project.

No code example is currently available or this language may not be supported.


to set the property. Associated enumeration: PermissionState.Unrestricted.

.NET Framework
Available since 1.1
Return to top