RadioButtonList in Repeater Control...Ouch

D

Darren

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
rdoRate.SelectedItem.Value.

Thanks in advance...Darren

<asp:Repeater id="rptCharts" Runat="server">
<ItemTemplate>
<div class="searchcontainer">
<div class="lnkcol"><a href='../links/?urlid=<%#
DataBinder.Eval(Container.DataItem, "linkid")%>'><%#
DataBinder.Eval(Container.DataItem, "linkname")%></a>
</div>
<div class="ratecol"><%# DataBinder.Eval(Container.DataItem,
"votes")%></div>
<asp:RadioButtonList AutoPostBack="true" ID="rdoRate"
RepeatDirection="horizontal" Runat="server">
<asp:ListItem Value="1"></asp:ListItem>
<asp:ListItem Value="2"></asp:ListItem>
<asp:ListItem Value="3"></asp:ListItem>
<asp:ListItem Value="4"></asp:ListItem>
<asp:ListItem Value="5"></asp:ListItem>
</asp:RadioButtonList>
</div>
</ItemTemplate>
</asp:Repeater>
 
C

Curt_C [MVP]

I do something similar like this:

foreach (RepeaterItem ri in this.rptrList.Items)
{
RadioButtonList myList=
((RadioButtonList ))ri.FindControl("rdoRate"));
...your stuff with this control here.....
}

Syntax isn't tested, off the top of my head, but you should get the idea
from here.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top