> For the complete documentation index, see [llms.txt](https://docs.wisej.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/docs/controls/notifications/toast.md).

# Toast

Unlike the static [`MessageBox`](/docs/controls/notifications/messagebox.md) and [`AlertBox`](/docs/controls/notifications/alertbox.md), the Wisej.NET `Toast` is an instantiable component that can be reused and updated while visible.

Position the `Toast` in any of 9 standard locations (default: `TopCenter`). It displays an icon and text content, with optional HTML support via the `AllowHtml` property.

{% hint style="warning" %}
`Toast` notifications auto-close after 5 seconds by default but don't auto-dispose. Enable `AutoDispose` for automatic disposal on close. Handle the `Click` event for user interactions and the `Close` event for cleanup operations.
{% endhint %}

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

## Features

### Delayed Closing

The `AutoCloseDelay` property controls notification display duration.

![Toast notification with custom auto-close delay](/files/-MjQO7XTcTll35SErymu)

### HTML Content

Enable HTML content by setting the `AllowHtml` property to `true`:

![Toast displaying HTML formatted content](/files/-MjQMF23K6JPWXEQcH8f)

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

```csharp
var toast = new Toast
{
	AllowHtml = true,
	Text = @"<ul>
	  <li>Coffee</li>
	  <li>Tea</li>
	  <li>Milk</li>
	  </ul>"
};
toast.Show();
```

{% endtab %}
{% endtabs %}

## Advanced

### JavaScript Widget

| Item             | Description                                                                                                         |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- |
| Class name       | "wisej.web.Toast"                                                                                                   |
| Theme appearance | "toast", 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/docs/controls/notifications/toast.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
