<asp:repeater id= "rePets " runat= "server ">
<HeaderTemplate>
<table> <tr> <td>
<asp:CheckBox ID= "chkPets " Runat= "server " Text= "pets "> </asp:CheckBox>
</td> </tr>
</HeaderTemplate>
<ItemTemplate>
<tr> <td> <asp:CheckBox ID= "chkPet " Runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "smallName ")%> '> </asp:CheckBox>
</td> </tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:repeater>
==================================================
如何获得chkPets呀??
------解决方案--------------------------------------------------------
你是想用js获得吗?
------解决方案--------------------------------------------------------
foreach (RepeaterItem ri in rePets.Items)
{
if (ri.ItemType == ListItemType.Header)
{
System.Web.UI.WebControls.CheckBox cb = ri.FindControl( "chkPets ");
}
}