Finish the Programming
There are only two steps left to finish this programming. Add a regular button and give it the name and ID of “Submit." Normally, a developer would have the results either sent to an email or added to a database. Programming this requires specific knowledge of your own application and how your Web server handles email. However, you can test whether the page works by adding a small bit of code to the “Submit" click event. First, add a label control and change the ID to “Result." Then, in Visual Web Developer, double click on the “Submit" button. In the code view for this, add these lines between the “Protected Sub Submit_Click" and the “End Sub" lines:
If VisualBasic.Checked Then
Result.Text = "You prefer Visual Basic."
ElseIf VisualC.Checked Then
Result.Text = "You prefer Visual C+"
ElseIf FigForth.Checked Then
Result.Text = "You have a strange mind!"
When you view this now with a browser and choose a button, a message will display in the label. RadioButtons have many properties in common with other ASP.NET controls so each can be enhanced with things font, size, color, borders and other values. The last image uses some of these as examples although in practice a design would not use this much variation on a page.