【发布时间】:2013-01-19 06:53:09
【问题描述】:
我在后面的代码中动态生成radiobutton。并将选中的属性设置为 true,即 Checked = true 用于 radiobutton。在 page_load 上,Radiobutton 在 IE、Firefox 中呈现为选中状态,但在 Chrome 中却没有呈现为 Radiobutton 未选中状态。
这是我的代码:
var radio = new HtmlInputRadioButton
{
ID = id
};
placeholder.Controls.Add(radio);
radio.Name = name;
radio.Checked = value;
在 Chrome 的 page_load 上选择单选按钮的修复方法是什么?
【问题讨论】:
-
value的值是多少? -
我正在传递一个布尔值 true。 radio.checked = true;
标签: c# asp.net google-chrome dynamic radio-button