ItemDataBound text modification question
- From: Ben R. <benr@xxxxxxxxxxxxxxxx>
- Date: Mon, 6 Jun 2005 08:42:03 -0700
I've got a repeater that's bound to a datareader and I'd like to
conditionally modify the text that is being outputted. Previously, I've done
this by assigning a name to attribute to the surrounding tablecell in which
the <%# %> tags reside and I could use the findcontrol to grab a handle to
the control by name and do any necessary modifications. I'm wondering if I
can get around this? Is it necessary to assign a name to a surrounding cell?
What if I'm not using a table? I tried to use e.item.controls(0), but this
does not seem to correspond with all available controls that get databound (I
guess it excludes non web-server controls like simple client side tables),
but there seems to be only one element of type "DataBoundLiteralControl." I
was guessing that this represented the text that was between the databinding
tags, and hoped that I could modify the text property to add some text in,
but it's a read only property. To sum it up, two questions:
1, what is the DataBoundLiteralControl actually used for? What does it
represent?
2, Is there a way to do what I'd like to do? To modify the text that is
bound, without using findcontrol? (The control has no name, it's just the
contents of the <%# %> tags.
Thanks...
.
- Follow-Ups:
- RE: ItemDataBound text modification question
- From: Steven Cheng[MSFT]
- RE: ItemDataBound text modification question
- Prev by Date: Re: Cookies
- Next by Date: Re: Java programmer lured back by .Net (Questions)
- Previous by thread: How to use .NET framework to toggle the power on a USB-powered dev
- Next by thread: RE: ItemDataBound text modification question
- Index(es):
Relevant Pages
|