# FormClosingEventArgs

Namespace: **Wisej.Web**

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

Provides data for the [FormClosing](/api/wisej.web/containers/form.md#formclosing) event.

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

```csharp
public class FormClosingEventArgs : CancelEventArgs
```

{% endtab %}

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

```visual-basic
Public Class FormClosingEventArgs
    Inherits CancelEventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) FormClosingEventArgs(closeReason, cancel)

Initializes a new instance of the [FormClosingEventArgs](/api/wisej.web/containers/form/wisej.web.formclosingeventargs.md) class.

| Name            | Type                                                                   | Description                                                                                                                             |
| --------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **closeReason** | [CloseReason](/api/wisej.web/containers/form/wisej.web.closereason.md) | A [CloseReason](/api/wisej.web/containers/form/wisej.web.closereason.md) value that represents the reason why the form is being closed. |
| **cancel**      | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)        | true to cancel the event; otherwise, false.                                                                                             |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) CloseReason

[CloseReason](/api/wisej.web/containers/form/wisej.web.closereason.md): Returns a value that indicates why the form is being closed.

## Used By

| Name                                                                                           | Description                                                                                              |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [FormClosingEventHandler](/api/wisej.web/containers/form/wisej.web.formclosingeventhandler.md) | Represents the method that handles a [FormClosing](/api/wisej.web/containers/form.md#formclosing) event. |


---

# 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/api/wisej.web/containers/form/wisej.web.formclosingeventargs.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.
