HtmlInputRadioButton.Value プロパティとは? わかりやすく解説

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

HtmlInputRadioButton.Value プロパティ

HtmlInputRadioButton コントロール関連付けられた値を取得または設定します

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

解説解説
使用例使用例

Value プロパティ使用して HtmlInputRadioButton コントロール説明関連付ける方法次のコード例示します

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

<html>
<head>

   <script runat="server">

      Sub Server_Change(sender As Object
 , e As EventArgs) 
      
         If Radio1.Checked Then
            Span1.InnerHtml = "You selected " &
 _
                              Radio1.Value
         ElseIf Radio2.Checked Then
            Span1.InnerHtml = "You selected " &
 _
                              Radio2.Value
         ElseIf Radio3.Checked Then
            Span1.InnerHtml = "You selected " &
 _
                              Radio3.Value
         End If

      End Sub
         

   </script>

</head>

<body>

   <form runat="server">

      <h3>HtmlInputRadioButton Sample</h3>

      <input type="radio" 
             id="Radio1" 
             name="Mode"
             value="Radio Button 1"
             OnServerChange="Server_Change" 
             runat="server"/>
      Option 1
      <br>

      <input type="radio" 
             id="Radio2" 
             name="Mode"
             value="Radio Button 2"
             OnServerChange="Server_Change" 
             runat="server"/>
      Option 2
      <br>

      <input type="radio" 
             id="Radio3" 
             name="Mode"
             value="Radio Button 3"
             OnServerChange="Server_Change" 
             runat="server"/>
      Option 3

      <p>

      <input type="submit" 
             id="Button1" 
             value="Submit" 
             runat="server"/>

      <p>

      <span id="Span1" 
            runat="server"/>

   </form>

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

<html>
<head>

   <script runat="server">

      void Server_Change(object sender, EventArgs e) 
      {
         if (Radio1.Checked)
            Span1.InnerHtml = "You selected " +
                              Radio1.Value;
         else if (Radio2.Checked)
            Span1.InnerHtml = "You selected " +
                              Radio2.Value;
         else if (Radio3.Checked)
            Span1.InnerHtml = "You selected " +
                              Radio3.Value;
      }
         

   </script>

</head>

<body>

   <form runat="server">

      <h3>HtmlInputRadioButton Sample</h3>

      <input type="radio" 
             id="Radio1" 
             name="Mode"
             value="Radio Button 1"
             OnServerChange="Server_Change" 
             runat="server"/>
      Option 1
      <br>

      <input type="radio" 
             id="Radio2" 
             name="Mode"
             value="Radio Button 2"
             OnServerChange="Server_Change" 
             runat="server"/>
      Option 2
      <br>

      <input type="radio" 
             id="Radio3" 
             name="Mode"
             value="Radio Button 3"
             OnServerChange="Server_Change" 
             runat="server"/>
      Option 3

      <p>

      <input type="submit" 
             id="Button1" 
             value="Submit" 
             runat="server"/>

      <p>

      <span id="Span1" 
            runat="server" />

   </form>

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


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

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

辞書ショートカット

すべての辞書の索引

「HtmlInputRadioButton.Value プロパティ」の関連用語

HtmlInputRadioButton.Value プロパティのお隣キーワード
検索ランキング

   

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



HtmlInputRadioButton.Value プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS