ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources]

G. andrew Duthie; matthew Macdonald

نسخه متنی -صفحه : 873/ 725
نمايش فراداده

CheckBoxdisposable

System.Web.UI.WebControls (system.web.dll)class

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 : WebControl, System.Web.UI.IPostBackDataHandler { // Public Constructors public

CheckBox ( ); // Public Instance Properties public virtual bool

AutoPostBack {set; get; } public virtual bool

Checked {set; get; } public virtual string

Text {set; get; } public virtual TextAlign

TextAlign {set; get; } // Protected Instance Methods protected virtual void

OnCheckedChanged (EventArgs

e ); protected override void

OnPreRender (EventArgs

e ); // overrides System.Web.UI.Control protected override void

Render (System.Web.UI.HtmlTextWriter

writer ); // overrides WebControl // Events public event EventHandler

CheckedChanged ; }

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)

Subclasses

RadioButton