单击 button怎样获取radiobuttonlist的值?
来源:百度知道 编辑:UC知道 时间:2024/05/28 20:06:01
单击 button怎样获取radiobuttonlist的值?
但是我想通过赋值的方式,让ui上面先择一个我想的表示选中!
但是我想通过赋值的方式,让ui上面先择一个我想的表示选中!
string val=this.RadioButtonList1.SelectedValue;
//val就是当前选中项的值
--------------------
你能说清楚一点儿吧..?
你是想根据某个值.来改变某一项被选中?
如果是这样儿的话.我刚已经答过你一次了.循环它:
for(int ii=0;ii<this.RadioButtonList1.Items.Count;ii++){
if(this.RadioButtonList1.Items[ii].Value.Equals("你想选中项的值")){
this.RadioButtonList1.Items[ii].Selected=true;
break;
}
}
string value = Request.QueryString["value"];
//我假设你的url参数是?value=xxx
this.RadioButtonList1.SelectValue = value;
//这就可以了
RadioButtonList对SelectValue属性的解释:
Gets the value of the selected item in the list control, or selects the item in the list control that contains the specified value.
this.RadioButtonList1.SelectedValue获取你选中项的value值
怎样打开ra格式文件
c# Button事件里怎么实现单击的奇偶效果?
asp.net一开始让BUTTON获取焦点的问题
怎么样在page_load 调用button的单击事件??? 请高人来指点!!!
C#中模拟button单击事件事那个方法。java中是doClick()
VC中BUTTON控件的消息响应问题(单击和按着不放进行不同的动作)
VC# 有分数啊 我想获取button的左上角的坐标
C++ windows窗体如何单击button把listview中的item保存到txt文件中,用另一个button把它重新写到listview
怎样下载单击游戏
在asp 中怎样设置按钮(button)的颜色