ASP.NET – A wonderful example of the use of RadioButton


<strong><html>
<head>
<span style="color: #0000ff;"><script language="VB" runat="server">
Sub SubmitBtn_Click(sender As Object, e As EventArgs)
If Radio1.Checked Then
Label1.Text = "You selected " &amp; Radio1.Text
Else If Radio2.Checked Then
Label1.Text = "You selected " &amp; Radio2.Text
Else If Radio3.Checked Then
Label1.Text = "You selected " &amp; Radio3.Text
End If
End Sub
</script></span>
</head>
<body>
<h3><font face="Verdana">RadioButton Example</font></h3>
<span style="color: #008000;"><form runat=server>
<span style="color: #333333;"><h4>Select the type of installation you wish to perform:</h4></span>
<asp:RadioButton id=Radio1 Text="Typical" Checked="True"
GroupName="RadioGroup1" runat="server" /><br>
<span style="color: #333333;">This option installs the features most typically used.
<i>Requires 1.2 MB disk space.</i><p></span>
<asp:RadioButton id=Radio2 Text="Compact"
GroupName="RadioGroup1" runat="server"/><br>
<span style="color: #333333;">This option installs the minimum files required to run the
product. <i>Requires 350 KB disk space.</i><p></span>
<asp:RadioButton id=Radio3 runat="server" Text="Full"
GroupName="RadioGroup1" /><br>
<span style="color: #333333;">This option installs all features for the product. <i>Requires
4.3 MB disk space.</i><p></span>
<asp:button text="Submit" OnClick="SubmitBtn_Click"
runat=server/>
<asp:Label id=Label1 font-bold="true" runat="server" />
</form></span>
</body>
</html></strong>
You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.