[thelist] (ASP.NET) Controls in a repeater
Tab Alleman
talleman at Lumpsum.com
Wed Sep 14 14:09:35 CDT 2005
VERY new to Dot Net...
I want to create a page that grabs a list of name/address/phones and associated RowIDs from a database and displays for each row:
checkbox | name/address/phone
So I decide to do this with a DataReader and a Repeater.
So in my repeater I've got (among other things):
<!-- code:
<td class="ContactSelect" align="center" valign="center">
<asp:CheckBox ID="cbSelect" Runat="server" />
<asp:Label ID="lblContactID" Visible="False" Runat="server" Text='<%# Container.DataItem("ID") %>' />
</td>
-->
I'm thinking that I can use invisible labels like the old ASP's hidden inputs. Maybe there's a better way. I'm new to this.
Question is how do I refer, individually, to the checkboxes this creates? I tried:
if cbSelect(0).Checked then
but I get:
"Class 'System.Web.UI.WebControls.Checkbox' cannot be indexed because it has no default property.
How does one reference the array of controls created by a repeater?
More information about the thelist
mailing list