RadioButton控件保持状态的问题
大家好!请教一个关于RadioButton的问题
描述如下:
TextBox RadioButton1(Checked=true) RadioButton2(Checked=false) Button1
以上是本例子默认RadioButton1为Checked,两个RadioButton的EnableViewState=false
Button1 click测试如下问题
if(RadioButton1.Checked = ture)
{
Rosponse.Write("aa");
}
else
if (RadioButton2.Checked = ture)
{
Rosponse.Write("bb");
}
}
以上代码不是复制源代码,如有字符敲错不必讨论这个错
现在问题是,当选择1 checked 可以显示 aa
当选中 2 checked 返回的还是 aa
这里请教如何保持RadioButton的状态用于往返
本人刚学,并自学,希望得到您的帮助,谢谢