Re: Modifying Content on ItemDataBound

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



First add closing tag for span :)

In ItemDataBound Event i use e.blabla.Controls collection. I guess its not
the best aproach (because when you change design, you have to rewrite logic
or at least the indexes :( ), but that was the only one I was able to find
out.

If you find more elegant way please let me know.

Lukas


"mavrick_101" <mavrick101@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C1CF680D-F144-4FD5-84E1-E3C2E18FC31C@xxxxxxxxxxxxxxxx
Hi,

I have a datarepeater, which has ItemTemplates. In the ItemDataBound Event
Handler I want to modify the content of the item.

Say for example
<ItemTemplate>
<span class="Normal"><%# DataBinder.Eval(Container.DataItem,"Description")
%>
</ItemTemplate>

I would like to alter the 'Description' based on some logic in the code.

Can I do this?

Your help would be greatly appreciated.
Thnx


.