在一 aspx页面里有
DropDownList1 有三个值1,2,3
RadioButtonList1 有三个值4,5,6两个的AutopostBack = ture当RadioButtonList1 的值是 5 时我在 DropDownList1 的SelectedIndexChanged 中加入了RadioButtonList1.Items.FindByValue("4").Selected = true;请问为什么页面刷新扣 RadioButtonList1 选择的还是 5 而不是 4 呢
RadioButtonList1.Items.FindByValue("4").Selected = true;这句也执行了.谢谢了!
DropDownList1 有三个值1,2,3
RadioButtonList1 有三个值4,5,6两个的AutopostBack = ture当RadioButtonList1 的值是 5 时我在 DropDownList1 的SelectedIndexChanged 中加入了RadioButtonList1.Items.FindByValue("4").Selected = true;请问为什么页面刷新扣 RadioButtonList1 选择的还是 5 而不是 4 呢
RadioButtonList1.Items.FindByValue("4").Selected = true;这句也执行了.谢谢了!
RadioButtonList1.SelectedIndex=n是 //n为设定数.
试一下.如果它还是选中5那就有问题了.看看控件HTML是否放在了FORM外了.