RadioButtonList可以根据各项的文本设定某项为选定项么? RadioButtonList可以根据各项的文本设定某项为选定项么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <asp:RadioButtonList ID="RadioButtonList1" runat="server"> <asp:ListItem Text="选项1" Value="1"></asp:ListItem> <asp:ListItem Text="选项2" Value="2"></asp:ListItem> </asp:RadioButtonList> foreach (ListItem item in RadioButtonList1.Items) { if (item.Text == "选项1") { item.Selected = true; } } 如何让程序先执行母版页的Page_Load 奇怪,无法下载网页附件 一个SQL查询转换成LINQ 高手请进 一道面试题 我用VS调试的时候不能显示图片?为什么? GridView排序时筛选没了? Base-64 字符串的无效长度 从数据库取出文本显示的问题 搜到很多sql中存取图片的文章,但是我现在用的是access,请大侠进来看看 有关Request.Form问题? 网站上传后,没有主页 从数据库中下载一个附件时名称出现乱码现象
<asp:ListItem Text="选项1" Value="1"></asp:ListItem>
<asp:ListItem Text="选项2" Value="2"></asp:ListItem>
</asp:RadioButtonList>
foreach (ListItem item in RadioButtonList1.Items)
{
if (item.Text == "选项1")
{
item.Selected = true;
}
}