ButtonType Enumeration

Note: This enumeration is new in the .NET Framework version 2.0.

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
public enum ButtonType
public enum 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 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: