LOOP THREW A REPEATER CONTROL

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a button in the same page as the repeter control, so when I click
that I need to loop threw the repeater and get the value of each textbox and
id

Dave
 
just loop through it's Items property

for each item as RepeaterItem in myRepeater.Items
if item.ItemType = ListItemType.Item orelse item.ItemType =
ListItemType.AlternatingItem then
dim someTextBox as TextBox = ctype(item.FindControl("input"), TextBox)
...
end if
next

MSDN documentation has some decent examples if you look at the Items
property of the repeater...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 
Back
Top