# ControlEventHandler

Namespace: **Wisej.Web**

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

Represents the method that will handle the [ControlAdded](https://docs.wisej.com/api/wisej.web/general/control/..#controladded) and [ControlRemoved](https://docs.wisej.com/api/wisej.web/general/control/..#controlremoved) events of the [Control](https://docs.wisej.com/api/wisej.web/general/control) class.

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

```csharp
public delegate void ControlEventHandler(Object sender, ControlEventArgs e)
```

{% endtab %}

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

```visual-basic
Public Delegate Sub ControlEventHandler(ByVal sender As [Object], ByVal e As ControlEventArgs)
```

{% endtab %}
{% endtabs %}

## Parameters

| Name       | Type                                                                                                | Description                                                                                                                         |
| ---------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **sender** | [Object](https://docs.microsoft.com/dotnet/api/system.object)                                       | The source of the event.                                                                                                            |
| **e**      | [ControlEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.controleventargs) | A [ControlEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.controleventargs) that contains the event data. |

## Fired By

| Name                                                                                             | Description                                                                                                                                             |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Control.ControlAdded](https://docs.wisej.com/api/wisej.web/general/control/..#controladded)     | Fired when a new control is added to the [ControlCollection](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.control.controlcollection). |
| [Control.ControlRemoved](https://docs.wisej.com/api/wisej.web/general/control/..#controlremoved) | Fired when a control is removed from the [ControlCollection](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.control.controlcollection). |
| [Form.MdiChildAdded](https://docs.wisej.com/api/containers/form#mdichildadded)                   | Fired when a multiple-document interface (MDI) child form is added to the mdi parent.                                                                   |
| [Form.MdiChildRemoved](https://docs.wisej.com/api/containers/form#mdichildremoved)               | Fired when a multiple-document interface (MDI) child form is removed from the mdi parent.                                                               |
