Skip to main content
Tab

ASPxButton.Image Property

Gets the settings of an image displayed within the button control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public CheckedButtonImageProperties Image { get; }

Property Value

Type Description
CheckedButtonImageProperties

A CheckedButtonImageProperties object that contains image settings.

Remarks

Use the Image property to specify the button’s image. The image position within the button is specified by the ASPxButton.ImagePosition property.

Online Demos

Example

The following examples illustrates how to use the Image property.

Web Forms:

<dx:ASPxButton ID="btnImageAndText" runat="server"
    Width="90px" Text="Cancel" AutoPostBack="false">
    <Image IconID="actions_cancel_16x16"></Image>
</dx:ASPxButton>

MVC:

@Html.DevExpress().Button(
    settings => {
        settings.Name = "btnImageAndText";
        settings.Width = 90;
        settings.Text = "Cancel";
        settings.Images.Image.IconID = IconID.ActionsCancel16x16;
}).GetHtml()

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Image property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also