473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Modifying Content on ItemDataBound

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
Nov 23 '06 #1
1 1019
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" <ma********@discussions.microsoft.comwrote in message
news:C1**********************************@microsof t.com...
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

Nov 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AspDotNetDeveloper | last post by:
I am having trouble figuring out how to modify the databound field data that is bound to a Repeater control, before it is output to the browser. I'm trying to add a hyperlink, with some querystring...
2
by: Steve Klett | last post by:
Hi- I am developing a hierarchical navigation system. I have a DataList with the root level items, on the ItemDataBound event, I check for the selected item, when found I'm adding an additional...
3
by: Clouds | last post by:
Hi ! How do I add the dynamic event handler for a dropdownlist present in the itemtemplate of a datalist !! I am doing it in the itemdatabound event of the datalist but it doesnt work... I am...
0
by: KJ | last post by:
I noticed the following behavior: With 2 repeaters nested, such as: <asp:repeater id=rptrParentRepeater runat="server"> <ItemTemplate> <asp:Repeater id="rptrChildRepeater" runat="server"...
0
by: ddman | last post by:
I'm writing a filtering application similar to a proxy server in vb.net. I need to intercept browser requests and modify them before throwing it back to the browser. How do I go about doing this?...
2
by: Ken Slight | last post by:
In C#, I use the following to bind ItemDataBound to a DataGrid: grid.ItemDataBound += new DataGridItemEventHandler(OnContentItemDataBound); Does anyone know the equivalent of this in vb.net? ...
1
by: greenb | last post by:
I'm using the ItemDataBound event of the DataGrid to highlight cells that are outside an acceptable range. Each row has a button column (CommandName='Select'), that is used to display addtional...
5
by: Nathan Sokalski | last post by:
I have a control that I want displayed in all items except the last one. I figured the best way to do this was to determine whether the current item was the last from within the ItemDataBound event...
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.