TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gaurav Singh
NA
0
25.2k
'System.Web.UI.WebControls.RadioButton'
Jul 8 2015 4:48 AM
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:
<asp:RadioButton ID="lstBorder" runat="server" Width="177px" Height="59px" />
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?
Reply
Answers (
5
)
how to post value from one webpge to anothernavigation scrn
Checkbox in ASP.NET