Monday, March 26, 2012

LOOP THREW A REPEATER CONTROL

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

Davejust 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!)
"Dave" <davef@.helixpoint.com> wrote in message
news:eUTgzzGlFHA.2904@.tk2msftngp13.phx.gbl...
>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

0 comments:

Post a Comment