A
AC [MVP MOSS]
I have a repeater with a header, footer, and item template. The item
template is the only one with server controls (hyperlinks, labels, and a
nested repeater). Within the top repeater, I'm handling the ItemDataBound
method in the code behind. In this handler, I need to get access to the
controls within the ItemTemplate.... however I've only found one way to do
this (and i"m not sure why it works).
Once I cast the sender (first param passed in my the ItemDataBound
handler) as a repeater, I see it has two items in the Controls property.
If I grab a reference to the second one, I can then use FindControls() to
get references to my labels, hyperlinks, and nested repeater in the item
template.
The thing that's confusing me: I can't figure out what is Control[0] and
Control[1] in the repeater. I know that the second one (Control[1]) gives
me what I need, just don't like the fact I don't know what it is. Checking
the ID of the control only yields a generic ID (ctr01 or something like
that).
Ideas?
TIA,
template is the only one with server controls (hyperlinks, labels, and a
nested repeater). Within the top repeater, I'm handling the ItemDataBound
method in the code behind. In this handler, I need to get access to the
controls within the ItemTemplate.... however I've only found one way to do
this (and i"m not sure why it works).
Once I cast the sender (first param passed in my the ItemDataBound
handler) as a repeater, I see it has two items in the Controls property.
If I grab a reference to the second one, I can then use FindControls() to
get references to my labels, hyperlinks, and nested repeater in the item
template.
The thing that's confusing me: I can't figure out what is Control[0] and
Control[1] in the repeater. I know that the second one (Control[1]) gives
me what I need, just don't like the fact I don't know what it is. Checking
the ID of the control only yields a generic ID (ctr01 or something like
that).
Ideas?
TIA,