# TabControlEventHandler

Namespace: **Wisej.Web**

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

Represents the method that will handle the [Selected](/api/wisej.web/containers/tabcontrol.md#selected) or [Deselected](/api/wisej.web/containers/tabcontrol.md#deselected) event of a [TabControl](/api/wisej.web/containers/tabcontrol.md) control.

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

```csharp
public delegate void TabControlEventHandler(Object sender, TabControlEventArgs e)
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Parameters

| Name       | Type                                                                                         | Description                                                                                                                  |
| ---------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **sender** | [Object](https://docs.microsoft.com/dotnet/api/system.object)                                | The source of the event.                                                                                                     |
| **e**      | [TabControlEventArgs](/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs.md) | A [TabControlEventArgs](/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs.md) that contains the event data. |

## Fired By

| Name                                                                                            | Description                                                                                                                                                                                                                                                         |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [TabControl.TabClosed](/api/wisej.web/containers/tabcontrol.md#tabclosed)                       | Occurs after a tab is closed by the user and has been removed from the tab control.                                                                                                                                                                                 |
| [TabControl.TabVisibilityChanged](/api/wisej.web/containers/tabcontrol.md#tabvisibilitychanged) | Occurs after a tab is shown or hidden by the user through the [ShowVisibilityMenu](/api/wisej.web/containers/tabcontrol.md#showvisibilitymenu) or programmatically through the [Hidden](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md#hidden) property. |
| [TabControl.Selected](/api/wisej.web/containers/tabcontrol.md#selected)                         | Fired when a tab is selected.                                                                                                                                                                                                                                       |
| [TabControl.Deselected](/api/wisej.web/containers/tabcontrol.md#deselected)                     | Fired when a tab is deselected.                                                                                                                                                                                                                                     |
| [TabControl.TabMoved](/api/wisej.web/containers/tabcontrol.md#tabmoved)                         | Fired when the user drags a [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md) into a new position and the [AllowUserToMoveTabs](/api/wisej.web/containers/tabcontrol.md#allowusertomovetabs) property is set to true.                            |


---

# 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/tabcontrol/wisej.web.tabcontroleventhandler.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.
