Repeater, Datatable, Radio Button List

E

Eskimo

I have a repeater, bound to a datatable that is created from a ftp site
holding directory names. I want to put the directory name into a radio button
and then get the value from the text (set to the directory name) when a
postback occurs. How to?

<asp:repeater id="Repeater1" runat="server">
<HeaderTemplate>
<table class="" cellspacing="4" cellpadding="4" width="100%">
<tr style="background-color:#E0E0E0">
<td></td>
<td>Path</td>
<td>File</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr style="background-color:#F0F0F0">
<td>
<asp:RadioButton id="RadioButton1" GroupName="Files"
OnCheckedChanged=RadioButton1_CheckedChanged AutoPostBack=True Text='<%#
DataBinder.Eval(Container.DataItem,"Path") %>' runat="server">
</asp:RadioButton>
</td>
<td align="left"><%# DataBinder.Eval(Container.DataItem,"Path")
%></td>
<td align="left"><%# DataBinder.Eval(Container.DataItem,"File")
%></td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr style="background-color:#E0E0E0">
<td>
<asp:RadioButton id="Radiobutton2" GroupName="Files"
OnCheckedChanged=RadioButton2_CheckedChanged AutoPostBack=True Text='<%#
DataBinder.Eval(Container.DataItem,"Path") %>' runat="server">
</asp:RadioButton>
</td>
<td align="left"><%# DataBinder.Eval(Container.DataItem,"Path")
%></td>
<td align="left"><%# DataBinder.Eval(Container.DataItem,"File")
%></td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:repeater>
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top