Name

CheckBox

Synopsis

This class represents a single checkbox that can be selected (True) or left unchecked (False). The CheckBox class also provides a TextAlign property, which specifies whether text will appear on the right or left side of the checkbox. To determine whether a checkbox is selected, examine the Checked property. If you want to use a checkbox with list data, the CheckBoxList control may be more convenient.

Public Class CheckBox : Inherits WebControl : Implements_
       System.Web.UI.IPostBackDataHandler
' Public Constructors
   Public Sub New() 
' Public Instance Properties
   Overridable Public Property AutoPostBack As Boolean  
   Overridable Public Property Checked As Boolean  
   Overridable Public Property Text As String  
   Overridable Public Property TextAlign As TextAlign  
' Protected Instance Methods
   Overridable Protected Sub OnCheckedChanged(
        ByVal e As EventArgs) 
   Overrides Protected Sub OnPreRender(ByVal e As EventArgs) 
   Overrides Protected Sub Render(
        ByVal writer As System.Web.UI.HtmlTextWriter) 
' Events
   Public Event CheckedChanged As EventHandler  
End Class

Hierarchy

System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor)WebControl(System.Web.UI.IAttributeAccessor) CheckBox(System.Web.UI.IPostBackDataHandler)

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.