ASP.NET(vb.net) & HTMLInputRadioButton - HTMLInputRadioButton : Creates a server-side control that maps to the <input type=radio> HTML element and allows you to create a radio button on a Web page.
ShotDev Focus:
- ASP.NET(vb.net) & HTMLInputRadioButton
Tag Control :
<input type=radio id="programmaticID" checked name="radiobuttongroup" runat="server" >
Example
HTMLInputRadioButton.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Button1_OnClick(sender As Object, e As EventArgs) If Radio1.Checked = True Then Me.lblText1.Text = "Radio 1 is checked" Else If Radio2.Checked = True Then Me.lblText1.Text = "Radio 2 is checked" Else If Radio3.Checked = true Then Me.lblText1.Text = "Radio 3 is checked" End If End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <input type="radio" id="Radio1" name="GrpRadio" runat="server"/>Option 1<br> <input type="radio" id="Radio2" name="GrpRadio" runat="server"/>Option 2<br> <input type="radio" id="Radio3" name="GrpRadio" runat="server"/>Option 3<br> <input id="Button1" type="button" OnServerClick="Button1_OnClick" value="Button" runat="server" /> <hr /> <asp:Label id="lblText1" runat="server"></asp:Label> </form> </body> </html>
Screenshot