Ok, so on the checkchanged event of the radiobutton, set the text attribute of the textbox to the selected item value of the radiobutton.
Here is what I would do, add this to your html form:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:RadioButton ID="RadioButton1" runat="server" GroupName="choice"
oncheckedchanged="RadioButton1_CheckedChanged" Text="Male" AutoPostBack="True"/>
<asp:RadioButton ID="RadioButton2" runat="server" GroupName="choice"
Text="Female" AutoPostBack="True"
oncheckedchanged="RadioButton2_CheckedChanged"/>;
and add this to your code-behind:
protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
if (RadioButton1.Checked)
{
TextBox1.Text = "Male";
}
}
protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
{
if (RadioButton2.Checked)
{
TextBox1.Text = "Female";
}
}