473,396 Members | 1,683 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,396 software developers and data experts.

ItemDataBound text modification?

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...
Jul 21 '05 #1
0 1064

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

Similar topics

3
by: Ben R. | last post by:
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...
2
by: kscdavefl | last post by:
When I execute the following code: private void applicationPermissionGrid_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if (e.Item.ItemType ==...
1
by: André Almeida Maldonado | last post by:
Hey Guys, I need to manipulate the data that is binding to a datagrid BEFORE its appearance to the user. Because I need to format it inside an If Clause. I was putting my code in the...
0
by: mplutodh1 | last post by:
I am trying to work with the ItemDataBound property of the DataList to modify the display for a page that lists future events. Here is the code: Sub OnItemDataBound(ByVal sender As Object, e As...
5
by: Nathan Sokalski | last post by:
I want to access the DataRow used in DataBinding from the ItemDataBound event. In my case, the reason for doing this is to determine whether I need to make a word singular or plural. How can I do...
4
by: Dennis E. Jones, Jr. | last post by:
I'm creating a dynamic control for each row in a REPEATER based on database values. ItemDataBound creates the control for the initial load (not postback), but I cannot get the control recreated...
0
by: Ben R. | last post by:
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...
0
by: simon | last post by:
hello, I was hoping someone could help me with an issue (using vb & .net 2.0) I have a datagrid and the first column shown i have an asp:textbox that i basically want to "group by" an ID and only...
2
by: srini.venkatesan | last post by:
I am trying to access a control from edititemtemplate in itemdatabound event, but I get a run time null reference exception. Class file : In Datagrid_update I am able to access with no issues....
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.