从数据库读写RadioButtonList选中的值
生活随笔
收集整理的這篇文章主要介紹了
从数据库读写RadioButtonList选中的值
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
從數據庫取出RadioButtonList選中的值
string str = "體育";//這一項可以從數據庫中讀出
for (int j = 0; j < this.RadioButtonList1.Items.Count; j++)
{
?if (str == this.RadioButtonList1.Items[j].Text.ToString())
?{
??this.RadioButtonList1.Items[j].Selected = true;
?}
}
?
?
RadioButtonList取值寫入數據庫;
this.RadioButtonList1.SelectedValue
轉載于:https://www.cnblogs.com/291099657/archive/2009/05/22/1487242.html
總結
以上是生活随笔為你收集整理的从数据库读写RadioButtonList选中的值的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA导出sql脚本
- 下一篇: Java高级篇 -- List选择及优化