HtmlInputCheckBox クラスとは? わかりやすく解説

HtmlInputCheckBox クラス

サーバーHTML <input type= checkbox> 要素へのプログラムによるアクセス許可します

名前空間: System.Web.UI.HtmlControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Class HtmlInputCheckBox
    Inherits HtmlInputControl
    Implements IPostBackDataHandler
Dim instance As HtmlInputCheckBox
public class HtmlInputCheckBox : HtmlInputControl,
 IPostBackDataHandler
public ref class HtmlInputCheckBox : public
 HtmlInputControl, IPostBackDataHandler
public class HtmlInputCheckBox extends HtmlInputControl
 implements IPostBackDataHandler
public class HtmlInputCheckBox extends
 HtmlInputControl implements IPostBackDataHandler
解説解説
使用例使用例

HtmlInputCheckBox コントロールグループからユーザーコントロール選択した場合単純な応答次のコード例示します

<%@ Page Language="VB" AutoEventWireup="True"
 %>

<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 football
           End If
 
           If (Soccer.Checked = true) Then
               ' You like soccer
           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>
   
<%@ Page Language="C#" %>

<html >
  <script language="C#" runat=server>

    protected void SubmitBtn_Click(object sender,
 EventArgs e)
    {
      if (Basketball.Checked)
      {
        // You like basketball
      }
      
      if (Football.Checked)
      {
        // You like football
      }
      
      if (Soccer.Checked)
      {
        // You like soccer
      }
    
    }
</script>
    <body>
       <form id="Form1" 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 id="Button1" type=button value="Enter" OnServerClick="SubmitBtn_Click"
 runat=server>
        </form>
    </body>
 </html>
   
<%@ Page Language="JScript" AutoEventWireup="True" %>

<html>
    <script language="JSCRIPT" runat=server>
       function SubmitBtn_Click (source : Object, e : EventArgs){
           if(Basketball.Checked == true){
               // You like basketball
           }
 
           if(Football.Checked == true){
               // You like football
           }
 
           if(Soccer.Checked == true){
               // You like soccer
           }
       }
    </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>
   
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.Web.UI.Control
     System.Web.UI.HtmlControls.HtmlControl
       System.Web.UI.HtmlControls.HtmlInputControl
        System.Web.UI.HtmlControls.HtmlInputCheckBox
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からHtmlInputCheckBox クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHtmlInputCheckBox クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHtmlInputCheckBox クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「HtmlInputCheckBox クラス」の関連用語

HtmlInputCheckBox クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HtmlInputCheckBox クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS