ASP .NET - How to Iterate through a repeater ?
- by Amokrane
Hi,
What I'm trying to do is iterate through a repeater and read some controls values:
foreach (RepeaterItem iter in TablePanier.Items)
{
string guid = ((HiddenField)iter.FindControl("guid")).Value.ToString();
// nombre exemplaires du livre
int nbExemplaires = int.Parse(((System.Web.UI.WebControls.TextBox)iter.FindControl("txtNbExemplaires")).Text.ToString());
}
As you can see, I have a HiddenValue and a TextBox. Unfortunately this isn't working, the values are not read correctly.
What's wrong?
Thank you!