Skip to main content
Tab

ASPxButton.RenderMode Property

Specifies whether the button is rendered as a button or as a link.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(ButtonRenderMode.Button)]
public ButtonRenderMode RenderMode { get; set; }

Property Value

Type Default Description
ButtonRenderMode Button

One of the ButtonRenderMode enumeration values.

Available values:

Name Description
Button

The button is rendered as an input HTML element.

ASPxButton_ButtonMode

The button is rendered as a hyperlink HTML element.

ASPxButton_LinkMode

Secondary

Identifies a button of secondary importance.

ASPxButton-Secondary

Outline

Represents the button with a colored border and without a background color.

ASPxButton-Outline

Danger

The button indicates a dangerous or potentially negative action.

ASPxButton-Danger

Remarks

Use the RenderMode property to specify which element is used to render a button: a hyperlink (the Link value) or an input (the others values).

Use the Link mode to create a hyperlink-style button on the Web page. In this mode, a button control has the same appearance as a ASPxHyperLink control, but has the same functionality as a ASPxButton control. If you want to link to another Web page when the control is clicked, use the ASPxHyperLink control.

The code samples below demonstrate a button’s ASP markup and the corresponding HTML code rendered for this button.

  • Button Render Mode

    ASPxButton_ButtonMode

    <dx:ASPxButton ID="ASPxButton1" runat="server" Text="OK" >
         <Image IconID="actions_apply_16x16">
         </Image>
    </dx:ASPxButton>
    
  • Link Render Mode

    Note

    In the Link render mode, the ASPxButton.UseSubmitBehavior and ASPxButton.Checked properties are not in effect.

    ASPxButton_LinkMode

    <dx:ASPxButton ID="ASPxButton3" runat="server" RenderMode="Link" Text="OK">
         <Image IconID="actions_apply_16x16">
         </Image>
    </dx:ASPxButton>
    
See Also