I' ve tried the following demo
[WebForm1.aspx]
<asp:Repeater id="Repeater1" runat="server" DataSource="<%# emoticons1 %>">
<ItemTemplate>
<asp:CheckBox ID="chkDeleted" Runat="server" Text="Delete" ></asp:CheckBox>
</ItemTemplate>
</asp:Repeater>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
[WebForm1.aspx.cs]
private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
sqlDataAdapter2.Fill(emoticons1);
Repeater1.DataBind();
}
}
private void Button1_Click(object sender, System.EventArgs e)
{
for(int i = 0; i < Repeater1.Items.Count; i++)
{
if ( ((CheckBox)Repeater1.Items[i].FindControl("chkDeleted")).Checked)
{
System.Diagnostics.Debug.WriteLine("Checked");
}
else
{
System.Diagnostics.Debug.WriteLine("Unchecked");
}
}
}
and it works fine...
Can you post more code? e.g the whole repeater control and not just the
ItemTemplate part?
--
_________________________
Kostas Pantos [MCP]
http://kostas.pantos.name
"Alan Silver" wrote:
[color=blue][color=green]
> >Sorry! I thought you wanted javascript, not C# (code behind)[/color]
>
> <g>
>
> I was wondering!! Any ideas on the actual problem?
>
> --
> Alan Silver
> (anything added below this line is nothing to do with me)
>[/color]