怎么绑定RadioButtonList;在线等求前辈们
各位大哥们你好:获取数据库里的值怎么从后台绑定给RadioButtonList;
以下是我用CodeSmith Studio生成的;list里就可以获得到真个BupHospitalityMeetRoom表里的信息;中有字段 guid 和 会议室的名称 SelectMeetRoom; 怎么把多个会议室绑给RadioButtonList;
BupHospitalityMeetRoomManage BupHospita = new BupHospitalityMeetRoomManage();
List<BupHospitalityMeetRoom> list = BupHospita.getBupHospitalityMeetRoomList();
谢谢给位,小弟在绑定方面有些薄弱;向大家学习了;
------解决方案--------------------
BupHospitalityMeetRoomManage BupHospita = new BupHospitalityMeetRoomManage();
List<BupHospitalityMeetRoom> list = BupHospita.getBupHospitalityMeetRoomList();
RadioButtonListID.DataSource=list;
RadioButtonListID.DataTextField="SelectMeetRoom";
RadioButtonListID.DataValueField = "guid";
RadioButtonListID.DataBind();