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!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top