HtmlInputRadioButton コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HtmlInputRadioButton コンストラクタの意味・解説 

HtmlInputRadioButton コンストラクタ

HtmlInputRadioButton クラス新しインスタンス初期化します。

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

Dim instance As New HtmlInputRadioButton
public HtmlInputRadioButton ()
public:
HtmlInputRadioButton ()
public HtmlInputRadioButton ()
public function HtmlInputRadioButton ()
解説解説
使用例使用例
<%@ Page Language="VB" AutoEventWireup="True"
 %>

<html>
   <script runat="server" >
  
      Sub Page_Load(sender As Object,
 e As EventArgs)

         If Not IsPostBack Then
         
            ' Create the first HtmlInputRadioButton control.
            Dim radio1 As HtmlInputRadioButton
 = New HtmlInputRadioButton()
            radio1.Value = "Value1"
            radio1.Checked = True
            radio1.Name = "RadioSet"

            ' Create the caption for the first HtmlInputRadioButton
 control.
            Dim span1 As HtmlGenericControl
 = New HtmlGenericControl("span")
            span1.InnerHtml = "Radio Button 1 <br>"

            ' Add the controls to the Controls collection of the 
            ' PlaceHolder control.
            Place.Controls.Clear()
            Place.Controls.Add(radio1)
            Place.Controls.Add(span1)

            ' Create the second HtmlInputRadioButton control.
            Dim radio2 As HtmlInputRadioButton
 = New HtmlInputRadioButton()
            radio2.Value = "Value2"
            radio2.Checked = False
            radio2.Name = "RadioSet"

            ' Create the caption for the second HtmlInputRadioButton
 control.
            Dim span2 As HtmlGenericControl
 = New HtmlGenericControl("span")
            span2.InnerHtml = "Radio Button 2 <br>"
         
            ' Add the control to the Controls collection of the 
            ' PlaceHolder control.
            Place.Controls.Add(radio2)
            Place.Controls.Add(span2)

         End If
         
      End Sub
  
   </script>
  
<body>

   <form runat="server">
  
      <h3> HtmlInputRadioButton Constructor Example </h3> 
  
      <asp:PlaceHolder id="Place" runat="server"/>
  
   </form>

</body>
</html>
 
<%@ Page Language="C#" AutoEventWireup="True" %>

<html>
   <script runat="server" >
  
      void Page_Load(Object sender, EventArgs e)
      {
         if(!IsPostBack)
         {
            // Create the first HtmlInputRadioButton control.
            HtmlInputRadioButton radio1 = new HtmlInputRadioButton();
            radio1.Value = "Value1";
            radio1.Checked = true;
            radio1.Name = "RadioSet";

            // Create the caption for the first HtmlInputRadioButton
 control.
            HtmlGenericControl span1 = new HtmlGenericControl("span");
            span1.InnerHtml = "Radio Button 1 <br>";

            // Add the controls to the Controls collection of the 
            // PlaceHolder control.
            Place.Controls.Clear();
            Place.Controls.Add(radio1);
            Place.Controls.Add(span1);

            // Create the second HtmlInputRadioButton control.
            HtmlInputRadioButton radio2 = new HtmlInputRadioButton();
            radio2.Value = "Value2";
            radio2.Checked = false;
            radio2.Name = "RadioSet";

            // Create the caption for the second HtmlInputRadioButton
 control.
            HtmlGenericControl span2 = new HtmlGenericControl("span");
            span2.InnerHtml = "Radio Button 2 <br>";
         
            // Add the control to the Controls collection of the 
            // PlaceHolder control.
            Place.Controls.Add(radio2);
            Place.Controls.Add(span2);
         }
      }
  
   </script>
  
<body>

   <form runat="server">
  
      <h3> HtmlInputRadioButton Constructor Example </h3> 
  
      <asp:PlaceHolder id="Place" runat="server"/>
  
   </form>

</body>
</html>
 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlInputRadioButton クラス
HtmlInputRadioButton メンバ
System.Web.UI.HtmlControls 名前空間
その他の技術情報
HTML サーバー コントロール



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

辞書ショートカット

すべての辞書の索引

「HtmlInputRadioButton コンストラクタ」の関連用語

HtmlInputRadioButton コンストラクタのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS