asp.net.ph

Skip Navigation LinksHome > ASP.NET Web Forms > Web Forms Server Controls > Controls You Can Use on Web Forms > ASP.NET HTML WebControls

ASP.NET HTML Controls

  Section Index


HtmlInputCheckBox Server Control

Allows programmatic access to the HTML <input type=checkbox> element on the server.

The HtmlInputCheckBox control <input type=checkbox...runat="server"> renders a control box that allows the user to switch between a true or false state.

When a user clicks the checkbox, the control’s Checked attribute is set to true. The Checked property can also be set declaratively at design time, or dynamically thru script.

Several checkboxes in a form may share the same control name. Thus, for example, checkboxes allow users to select several values for the same property.

When a form is submitted, only selected checkbox controls are sent with the form data set. Each selected check box generates a separate name/value pair in the submitted data, even if this results in duplicate names.

The following sample illustrates using the HtmlInputCheckBox control.

HtmlInputCheckBox Control Example
Run Sample | View Source
See Also

HtmlInputCheckBox Control Syntax   CheckBox and CheckBoxList Controls   HTML INPUT Element

More ...
Back to top


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note