Ok, probably haven't explained it very well. Only wanted to do dynamic
labels to associate the HTML <label> tag with the correct radio button.
But ignoring the ID then for the moment (I actually also want to set the
'value' dynamically to, and which would have been better if I said that
instead of ID), how about dynamically setting the text?
E.g.
<asp:repeater ID="test" runat="server">
<itemtemplate>
<asp:RadioButton id="testid" Text="<%# Container.DataItem["myfield"]%>"
GroupName="testgroupname" runat="server"/>
</itemtemplate>
</asp:repeater>
?
Thanks
Matt
"london calling" <lo***********@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
Hi Matt,
You may be able to dynamically set the radiobutton's id but i dont think
it
would be very useful to you.
If you use the same id in the template, then by the INamingContainer
interface that the repeater implements, the ids will be unique on the
client
side (if accessing them from script) and you can still find the control by
myRepeaterItem.FindControl("myradiobuttonid")
HTH jd
"Matt Jensen" wrote:
Am I right in saying that you can't have a Radiobutton web control inside
a
repeater bound to a database datasource and (inline) dynamically set it's
ID
and text properties from the repeaters rows?
This is the impression I've got after extensive searching and trial and
error, even thought I have to say I find it hard to believe?
Thanks
Matt