> For the complete documentation index, see [llms.txt](https://docs.wisej.com/api/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/api/v2.2/wisej.web/buttons/wisej.web.buttonbase.md).

# ButtonBase

Namespace: **Wisej.Web**

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

* [Control](/api/v2.2/wisej.web/general/control.md)
  * [ButtonBase](/api/v2.2/wisej.web/buttons/wisej.web.buttonbase.md)

Implements the basic functionality common to button controls.

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

```csharp
public class ButtonBase : Control
```

{% endtab %}

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

```visual-basic
Public Class ButtonBase
    Inherits Control
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/-MTRl851gGvQXMvSEG1f)ButtonBase()

Initializes a new instance of the [ButtonBase](/api/v2.2/wisej.web/buttons/wisej.web.buttonbase.md) class.

## Properties

### ![](/files/-MTRl851gGvQXMvSEG1f)AllowHtml

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets a value indicating that the control can display HTML in the Text property.

Newlines (CRLF) are converted to\
when allowHtml is false, or when allowHtml is true and the text doesn't contain any html.

### ![](/files/-MTRl851gGvQXMvSEG1f)AutoEllipsis

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether the ellipsis character (...) appears at the right edge of the control, denoting that the text extends beyond the size of the control.

### ![](/files/-MTRl851gGvQXMvSEG1f)AutoShowLoader

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether the application blocks the browser with a modal mask when this button is clicked and until the server is done processing the execution request.

[AutoShowLoader](#autoshowloader) blocks the entire browser as soon as the button is clicked since it's implemented on the client side, while [ShowLoader](/api/v2.2/wisej.web/general/control.md#showloader) blocks the specific widget when returning from the request.

### ![](/files/-MTRl851gGvQXMvSEG1f)AutoSize

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets a value that indicates whether the control resizes based on its contents.

### ![](/files/-MTRl851gGvQXMvSEG1f)Image

[Image](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.image): Returns or sets the image that is displayed in a button control.

### ![](/files/-MTRl851gGvQXMvSEG1f)ImageAlign

[ContentAlignment](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.contentalignment): Returns or sets the alignment of the image in the button control.

### ![](/files/-MTRl851gGvQXMvSEG1f)ImageIndex

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): Returns or sets the image list index value of the image in the [ImageList](#imagelist) displayed in the button control.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) The specified index is less than -1.

### ![](/files/-MTRl851gGvQXMvSEG1f)ImageKey

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the key accessor for the image in the [ImageList](#imagelist) displayed in the button control.

### ![](/files/-MTRl851gGvQXMvSEG1f)ImageList

[ImageList](/api/v2.2/wisej.web/content/imagelist.md): Returns or sets the [ImageList](/api/v2.2/wisej.web/content/imagelist.md) that contains the [Image](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.image) displayed in a button control.

### ![](/files/-MTRl851gGvQXMvSEG1f)ImageSource

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the theme name or URL for the image to display in the button control.

### ![](/files/-MTRl851gGvQXMvSEG1f)Text

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the text associated with this control.

Newlines (CRLF) are converted to\
when allowHtml is false, or when allowHtml is true and the text doesn't contain any html.

### ![](/files/-MTRl851gGvQXMvSEG1f)TextAlign

[ContentAlignment](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.contentalignment): Returns or sets the alignment of the text in the button control.

### ![](/files/-MTRl851gGvQXMvSEG1f)TextImageRelation

[TextImageRelation](/api/v2.2/wisej.web/enumerations/wisej.web.textimagerelation.md): Returns or sets the position of text and image relative to each other.

### ![](/files/-MTRl851gGvQXMvSEG1f)UseMnemonic

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether the first character that is preceded by an ampersand (&) is used as the mnemonic key of the control.

## Methods

### ![](/files/-MTRl851gGvQXMvSEG1f)PerformClick()

Generates a [Click](/api/v2.2/wisej.web/general/control.md#click) event for a button.

## Inherited By

| Name                                                                | Description                                                                                                                                                             |
| ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Button](/api/v2.2/wisej.web/buttons/button.md)                     | Represents a button control.                                                                                                                                            |
| [CheckBox](/api/v2.2/wisej.web/buttons/wisej.web.checkbox.md)       | Represents a check box control.                                                                                                                                         |
| [RadioButton](/api/v2.2/wisej.web/buttons/wisej.web.radiobutton.md) | Enables the user to select a single option from a group of choices when paired with other [RadioButton](/api/v2.2/wisej.web/buttons/wisej.web.radiobutton.md) controls. |
| [SplitButton](/api/v2.2/wisej.web/buttons/wisej.web.splitbutton.md) | Represents a split button control.                                                                                                                                      |

## Implements

| Name                                                                                   | Description                                                                                                                |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [IBindableComponent](/api/v2.2/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                              |
| [IWisejComponent](/api/v2.2/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                             |
| [IWisejControl](/api/v2.2/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/v2.2/wisej.web/general/control.md) class must implement this interface. |
| [IWisejSerializable](/api/v2.2/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                                      |


---

# 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:

```
GET https://docs.wisej.com/api/v2.2/wisej.web/buttons/wisej.web.buttonbase.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.
