This documentation is archived and is not being maintained.

ButtonType Enumeration

Specifies the different types of buttons that can be rendered in a Web Forms page.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public enum class ButtonType

Member nameDescription
ButtonA command button.
ImageA button that displays an image.
LinkA hyperlink-style button.

The ButtonType enumeration is used to represent the different types of buttons (such as command button, image button, link button, and so on) that can be rendered on an ASP.NET page. It is commonly used by properties such as the ButtonType property of the ButtonFieldBase class to indicate which button type is being used by the parent control.

The following example demonstrates how to use the ButtonType enumeration to specify that link buttons are displayed in a ButtonField field column of a GridView control. The ButtonType property of a ButtonField object is declaratively set to ButtonType.Link.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: