# MessageBox

The Wisej.NET `MessageBox` cannot be instantiated directly. Display messages by calling the static `MessageBox.Show` method, which accepts parameters for title, message, buttons, and icon configuration.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation.](http://docs.wisej.com/api)
{% endhint %}

## Features

### Styles

The `MessageBox` supports several alert styles:

* `None`: No icon displayed
* `Error`: Red X or exclamation point indicating an error
* `Stop`: Stop sign icon
* `Hand`: Raised hand icon
* `Question`: Question mark in circle
* `Warning`: Exclamation point in triangle
* `Information`: Letter i in circle

![MessageBox showing different icon styles](https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-62e0c3102fece9d8aced0105615cdc44d7f81a8f%2Fimage.png?alt=media)

### HTML Content

Enable HTML content in messages by setting the `allowHtml` parameter to `true`:

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

```csharp
MessageBox.Show(@"<ul>
                  <li>Coffee</li>
                  <li>Tea</li>
                  <li>Milk</li>
                </ul>", allowHtml: true);
```

{% endtab %}
{% endtabs %}

![MessageBox displaying HTML formatted list](https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-6a503d03117692c387098644ad310c4f2cff37c2%2Fimage.png?alt=media)

## Advanced

### JavaScript Widget

| Item             | Description                                                                                                         |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- |
| Class name       | "wisej.web.MessageBox"                                                                                              |
| Theme appearance | "messagebox", see [Themes](https://docs.wisej.com/theme-builder/theme-elements/elements)                            |
| Source code      | [https://github.com/iceteagroup/wisej-js](https://github.com/iceteagroup/wisej-js/blob/master/wisej.web.TextBox.js) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/docs/controls/notifications/messagebox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
