Tôi muốn hiển thị một danh sách đơn giản - Điều khiển. Mã ASP.NET phía sau của tôi trông giống như:Làm cách nào để ngăn chặn asp: RadioButtonList hiển thị một bảng HTML?
RadioButtonList list = new RadioButtonList();
list.ID = rbl.name;
list.CssClass = rbl.cssClass;
foreach (radio radio in rbl.radio)
{
ListItem li = new ListItem();
li.Text = radio.label;
li.Value = radio.value;
li.Selected = [email protected];
list.Items.Add(li);
}
Nhưng RadioButtonList tự động hiển thị bảng HTML. Nếu tôi sử dụng HtmlInputRadioButton tất cả mọi thứ hoạt động tốt nhưng nó bị treo trên RenderControl()
Cảm ơn rất nhiều. Đây là câu trả lời hoàn hảo nhất mà tôi từng thấy. –