三选一:
控件 属性
RadiobuttonList GroupName=随便添 RepeatDirection=Horizontal Item加入你的东西(电话,手机,邮箱。)
Button ID=Button1
-------------------------------------
private void Button1_Click(object sender, System.EventArgs e)
{
if(RadioButtonList1.SelectedIndex==-1)
{
Response.Write("Must be not null!");
}
else
{
//获取选项的值
Response.Write(RadioButtonList1.SelectedValue);
}
}