# MessageBox

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Component](https://docs.wisej.com/api/wisej.base/general/wisej.base.component)
  * [MessageBox](https://docs.wisej.com/api/wisej.web/notifications/messagebox)

Displays a message box that can contain text, buttons, and symbols that inform and instruct the user.

{% tabs %}
{% tab title="C#" %}

```csharp
public class MessageBox : Component
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class MessageBox
    Inherits Component
```

{% endtab %}
{% endtabs %}

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) Dispose(disposing)

Frees resources related to this component.

| Parameter     | Type                                                            | Description                                                                 |
| ------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                                           | Description      |
| --------- | ------------------------------------------------------------------------------ | ---------------- |
| **e**     | [WisejEventArgs](https://docs.wisej.com/api/wisej.core/general/wisejeventargs) | Event arguments. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Show(text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft, onclose)

Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

| Parameter                                                                                                                                                                                                                       | Type                                                                                                                       | Description                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **text**                                                                                                                                                                                                                        | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the message box. Newlines (CRLF) are converted to \<BR/> when the text doesn't contain any html.                                                                             |
| **caption** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the title bar of the message box.                                                                                                                                            |
| **buttons** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons)             | One of the [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons) values that specifies which buttons to display in the message box.        |
| **icon** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)          | [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon)                     | One of the [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon) values that specifies which icon to display in the message box.                   |
| **defaultButton** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media) | [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) | One of the [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) values that specifies the default button for the message box. |
| **modal** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)         | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Indicates whether the message box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal. |
| **allowHtml** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Allows the message text to include HTML code.                                                                                                                                                       |
| **keepOnScreen** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Keeps the message box in the viewable area when being moved by the user. The default is false.                                                                                                      |
| **rightToLeft** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)   | [RightToLeft](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.righttoleft)                                     | Indicates whether the dialog box should display it's content right aligned.                                                                                                                         |
| **onclose** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [Action\<DialogResult>](https://docs.microsoft.com/dotnet/api/system.action-1)                                             | Optional async handler for the close event; called when the MessageBox has been closed.                                                                                                             |

**Returns:** [DialogResult](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.dialogresult). One of the [DialogResult](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.dialogresult) values.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Show(owner, text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft, onclose)

Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

| Parameter                                                                                                                                                                                                                       | Type                                                                                                                       | Description                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **owner**                                                                                                                                                                                                                       | [Form](https://docs.wisej.com/api/wisej.web/containers/form)                                                               | An implementation of [Form](https://docs.wisej.com/api/wisej.web/containers/form) that owns the modal dialog box.                                                                                   |
| **text**                                                                                                                                                                                                                        | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the message box. Newlines (CRLF) are converted to \<BR/> when the text doesn't contain any html.                                                                             |
| **caption** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the title bar of the message box.                                                                                                                                            |
| **buttons** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons)             | One of the [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons) values that specifies which buttons to display in the message box.        |
| **icon** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)          | [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon)                     | One of the [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon) values that specifies which icon to display in the message box.                   |
| **defaultButton** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media) | [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) | One of the [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) values that specifies the default button for the message box. |
| **modal** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)         | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Indicates whether the dialog box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal.  |
| **allowHtml** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Allows the message text to include HTML code.                                                                                                                                                       |
| **keepOnScreen** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Keeps the message box in the viewable area when being moved by the user. The default is false.                                                                                                      |
| **rightToLeft** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)   | [RightToLeft](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.righttoleft)                                     | Indicates whether the dialog box should display it's content right aligned.                                                                                                                         |
| **onclose** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [Action\<DialogResult>](https://docs.microsoft.com/dotnet/api/system.action-1)                                             | Optional async handler for the close event; called when the MessageBox has been closed.                                                                                                             |

**Returns:** [DialogResult](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.dialogresult). One of the [DialogResult](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.dialogresult) values.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) ShowAsync(text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft)

Asynchronously displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

| Parameter                                                                                                                                                                                                                       | Type                                                                                                                       | Description                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **text**                                                                                                                                                                                                                        | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the message box. Newlines (CRLF) are converted to \<BR/> when the text doesn't contain any html.                                                                             |
| **caption** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the title bar of the message box.                                                                                                                                            |
| **buttons** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons)             | One of the [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons) values that specifies which buttons to display in the message box.        |
| **icon** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)          | [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon)                     | One of the [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon) values that specifies which icon to display in the message box.                   |
| **defaultButton** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media) | [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) | One of the [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) values that specifies the default button for the message box. |
| **modal** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)         | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Indicates whether the dialog box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal.  |
| **allowHtml** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Allows the message text to include HTML code.                                                                                                                                                       |
| **keepOnScreen** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Keeps the message box in the viewable area when being moved by the user. The default is false.                                                                                                      |
| **rightToLeft** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)   | [RightToLeft](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.righttoleft)                                     | Indicates whether the dialog box should display it's content right aligned.                                                                                                                         |

**Returns:** [Task\<DialogResult>](https://docs.microsoft.com/dotnet/api/system.threading.tasks.task-1). One of the [DialogResult](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.dialogresult) values.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) ShowAsync(owner, text, caption, buttons, icon, defaultButton, modal, allowHtml, keepOnScreen, rightToLeft)

Asynchronously displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.

| Parameter                                                                                                                                                                                                                       | Type                                                                                                                       | Description                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **owner**                                                                                                                                                                                                                       | [Form](https://docs.wisej.com/api/wisej.web/containers/form)                                                               | An implementation of [Form](https://docs.wisej.com/api/wisej.web/containers/form) that owns the modal dialog box.                                                                                   |
| **text**                                                                                                                                                                                                                        | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the message box. Newlines (CRLF) are converted to \<BR/> when the text doesn't contain any html.                                                                             |
| **caption** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [String](https://docs.microsoft.com/dotnet/api/system.string)                                                              | The text to display in the title bar of the message box.                                                                                                                                            |
| **buttons** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)       | [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons)             | One of the [MessageBoxButtons](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxbuttons) values that specifies which buttons to display in the message box.        |
| **icon** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)          | [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon)                     | One of the [MessageBoxIcon](https://docs.wisej.com/api/wisej.web/notifications/alertbox/wisej.web.messageboxicon) values that specifies which icon to display in the message box.                   |
| **defaultButton** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media) | [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) | One of the [MessageBoxDefaultButton](https://docs.wisej.com/api/wisej.web/notifications/messagebox/wisej.web.messageboxdefaultbutton) values that specifies the default button for the message box. |
| **modal** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)         | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Indicates whether the dialog box is modal and waits for the user response before resuming execution. When set to false, the return value is always DialogResult.None. The default is true - modal.  |
| **allowHtml** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Allows the message text to include HTML code.                                                                                                                                                       |
| **keepOnScreen** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                                            | Keeps the message box in the viewable area when being moved by the user. The default is false.                                                                                                      |
| **rightToLeft** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media)   | [RightToLeft](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.righttoleft)                                     | Indicates whether the dialog box should display it's content right aligned.                                                                                                                         |

**Returns:** [Task\<DialogResult>](https://docs.microsoft.com/dotnet/api/system.threading.tasks.task-1). One of the [DialogResult](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.dialogresult) values.

## Implements

| Name                                                                                                 | Description                                                                                                     |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                  |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                           |
