NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HtmlInputCheckBox Class

The HtmlInputCheckBox class defines the methods, properties, and events for the HtmlInputCheckBox control. This class allows programmatic access to the HTML <input type= checkbox> element on the server.

Object
   Control
      HtmlControl
         HtmlInputControl
            HtmlInputCheckBox

[Visual Basic]
Public Class HtmlInputCheckBox
   Inherits HtmlInputControl
   Implements IPostBackDataHandler
[C#]
public class HtmlInputCheckBox : HtmlInputControl,
   IPostBackDataHandler
[C++]
public __gc class HtmlInputCheckBox : public HtmlInputControl,
   IPostBackDataHandler
[JScript]
public class HtmlInputCheckBox extends HtmlInputControl,
   IPostBackDataHandler

Remarks

[To be supplied.]

Requirements

Namespace: System.Web.UI.HtmlControls

Assembly: System.Web.dll

Example [Visual Basic]

This sample demonstrates a set of simples respones to users selecting from a group of HtmlInputCheckBox controls.

[Visual Basic]

<html>
   <script language="VB" runat=server>
      Sub SubmitBtn_Click (Source As Object, ByVal E as EventArgs)
          If (Basketball.Checked = true) Then 
  ' You like basketball
          End If

          If (Football.Checked = true) Then
  ' You like basketball
          End If

          If (Soccer.Checked = true) Then
  ' You like basketball
          End If
      End Sub
   </script>
 
   <body>
      <form method=post runat=server>
        Enter Interests:  
        <input id="Basketball" checked type=checkbox runat=server> Basketball
        <input id="Football" type=checkbox runat=server> Football
        <input id="Soccer" type=checkbox runat="server"> Soccer
    
        <input type=button value="Enter" OnServerClick="SubmitBtn_Click" runat=server>
       </form>
   </body>
</html>

See Also

HtmlInputCheckBox Members | System.Web.UI.HtmlControls Namespace