I tried to add radio button list items dynamically with code and i got this error:
'System.Web.UI.WebControls.RadioButton' does not contain a definition for 'Items'and no extension method 'Items' accepting a first argument of type 'System.Web.UI.WebControls.RadioButton' could be found (are you missing a using directive or an assembly reference?)
my code is:protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
ListItem item = new ListItem();
item.Text = BorderStyle.None.ToString();
item.Value = ((int)BorderStyle.None).ToString();
lstBorder.Items.Add(item);
}
}
I would appreciate if you could help me. I even didnt get the part if Items is not a property in radio button list? how could i fix it?

Rajeev PunhaniRank #551 · 4.4K reputationPosted Jul 8, 2015, 2:09 AM EDT
Posted Jul 8, 2015, 2:13 AM EDT
Posted Jul 8, 2015, 2:14 AM EDT
Rajeev PunhaniRank #551 · 4.4K reputationPosted Jul 8, 2015, 5:36 AM EDT
Posted Jul 14, 2015, 9:12 PM EDT