Partager via


HtmlWindow.Confirm Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons.

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

Syntax

'Declaration
Public Function Confirm ( _
    confirmText As String _
) As Boolean
public bool Confirm(
    string confirmText
)

Parameters

Return Value

Type: System.Boolean
true if the user clicked the OK button; otherwise, false.

Remarks

See the confirm method in the dynamic HTML (DHTML) documentation for information about the JavaScript confirm method.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.