Question : adding a text box to a radio button list?

Hi, I have a radio button list, but was hoping to add a textbox to the last option like this.  Is this possible to do?  If this radio button is selected, is it possible to make entering info into the text box required?  Thanks!

 Status:*
undergraduate
graduate
faculty or staff
guest user (non-TWU).  What school are you from? [text box here]
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:

Status:*

Answer : adding a text box to a radio button list?

That someone is going to be me, and I am going to try to get you where you need to be, without doing the work for you.

Important points from the article:

1) Attach an event handler in HTML for the SelectedIndexChanged event

            OnSelectedIndexChanged="Index_Changed"
            AutoPostBack="true"
            runat="server"/>

2) Define the event handler in the code-behind

   VB.NET:
   Sub Index_Changed(sender As Object, e As EventArgs)        
        Label1.Text = "You selected " & RadioButtonList1.SelectedItem.Text & _
            " with a value of : " & RadioButtonList1.SelectedItem.Value & "."
    End Sub

    C#:
    void Index_Changed(Object sender, EventArgs e) {

       Label1.Text = "You selected " + RadioButtonList1.SelectedItem.Text +
                     " with a value of $" + RadioButtonList1.SelectedItem.Value +
                     ".";

    }
Random Solutions  
 
programming4us programming4us