473,378 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

RadioButtonList in a repeater

When I have an asp:radiobuttonlist control in a repeater
and I want to dynamically preset a ListItem's selected
property to true or false, I get an error message that
says "BC30676: 'DataBinding' is not an event
of 'System.Web.UI.WebControls.ListItem'."

Can anyone tell me what the solution or work around is for
this? My HTML is below.

Thanks, --David

<asp:repeater id="rptQuestions" runat="server">
<ItemTemplate>

<asp:radiobuttonlist id="optAnswer" runat="server">
<asp:ListItem Value="1" Selected='<%# Container.DataItem
("SelectedYes") %>'>Yes</asp:ListItem>
<asp:ListItem Value="0" Selected='<%# Container.DataItem
("SelectedNo") %>'>No</asp:ListItem>
</asp:radiobuttonlist>
<%# Container.DataItem("Question") %>

</ItemTemplate>
</asp:repeater>

Nov 17 '05 #1
0 1478

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David Davis | last post by:
When I have an asp:radiobuttonlist control in a repeater and I want to dynamically preset a ListItem's selected property to true or false, I get an error message that says "BC30676: 'DataBinding'...
1
by: Ravi | last post by:
Hi, I have a radio button list and a dropdownlist inside a repeater control. Want to hide or display the dropdownlist based on selection in radiobuttonlist. I can add the...
4
by: Emil | last post by:
Can somebody tell me what would be the syntax for having an if statement and setting the selected index of a radiobuttonlist? This is my first project using ASP.net and I use C#. I have a repeater...
1
by: Darren | last post by:
Dear Groups, I have searched EVERYWHERE on the net and msdn for a solution to my problem and am coming up with nothing. I simply need to capture the 'selected row' and the...
0
by: djarmoluk | last post by:
I have a RadioButtonList (named rbAnswers) control within a repeater control. When binding to the repeater, I am trying to add an "OnChange" attribute to the individual list item controls (input...
2
by: WB | last post by:
Hi, I have the following nested RadioButtonList in my web page that displays a list of cities (categorized in states) for the user to select. There's a RequiredFieldValidator to ensure user has...
2
by: Michael Bohman | last post by:
Hi, i have a small problem with assigning a database value to a RadioButtonList control. On my form i have 3 user admin=1, premium=2 and basic=3, theese values is stored in an access database in a...
0
by: papaja | last post by:
I have gollowing code: <asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%#Eval("Pitanje") %>'></asp:Label> <asp:RadioButtonList...
3
by: Brian | last post by:
Using external XML, I'm trying to build a quiz, but I can't seem to specify the DataSource for the RadioButtonList within a Repeater ItemTemplate. I've tried a number of approaches, but I haven't...
0
by: CURTISLESPERANCE | last post by:
Hi, I have a radiobuttonlist within a nested repeater, resulting in multiple radiobuttonlists. On a button click how do I find out what those selected values of the radiobuttons were? Code...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.