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

Displaying a counter value within a Repeater Control

Hi there,

something I thought would be really really easy so far hasn't been easy
at all.

I'm using the Repeater control to produce some HTML with values taken
from a DataSet. That is totally fine, works without a hitch.

What I would love to do is have the iteration count of the Repeater as
it outputs the HTML - ie:

1. row 1
2. row 2
3. row 3 etc etc

I cannot for the life of me find a way to get the Repeater to provide
me with the increasing count value (I've been able to get a final
count, which isn't that useful).

Has anyone got an suggestions?

Nov 19 '05 #1
1 1707
Put a label in the item template. In the PreRender event loop through the
data items and assign the iteration index value to the label's Text.

Eliyahu

"Bhelliom" <bh******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi there,

something I thought would be really really easy so far hasn't been easy
at all.

I'm using the Repeater control to produce some HTML with values taken
from a DataSet. That is totally fine, works without a hitch.

What I would love to do is have the iteration count of the Repeater as
it outputs the HTML - ie:

1. row 1
2. row 2
3. row 3 etc etc

I cannot for the life of me find a way to get the Repeater to provide
me with the increasing count value (I've been able to get a final
count, which isn't that useful).

Has anyone got an suggestions?

Nov 19 '05 #2

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

Similar topics

2
by: marvin | last post by:
Hi, I am trying to display images in a repeater from a SQL database and do some transformations on the image prior to displaying them (such as thumbnail with a shadow). The problem is I can't...
1
by: Shari | last post by:
I am trying to use a repeater control in an ASP.NET application (codebehind is C#), to display a bunch of error messages after a validation has occurred. In the codebehind, I have access to the...
8
by: darrel | last post by:
*sigh*...I've asked this before, but have long forgotten the answer. In the past, I'd often use repeater controls, bind data to it, and then reference the data fields from within the repeater: ...
5
by: Imran Aziz | last post by:
Hello all, I am populating the contents of a repeater control using a database query. In the repeater control I have a link , which I want to display or not based on the current logged in user....
5
by: Brad Baker | last post by:
I'm completely new to ASP.NET programming, so please accept my apologies in advance for asking what is probably an obvious question. :-) I'm trying to write a page which will display the...
2
by: AC [MVP MOSS] | last post by:
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...
5
by: jasonchan | last post by:
How would you set up a counter in javascript that goes from 5 to 0 This is what i have so far and it is not displaying in the div container "counter" for some reason... <!DOCTYPE html PUBLIC...
1
by: Eric Layman | last post by:
Hi, How do I add row counter to a repeater control? <ItemTemplate> <tr style="FONT-FAMILY:Tahoma;FONT-SIZE:10PX"> <td valign="TOP" ALIGN="LEFT"><%# GetNextNumber()%></td>
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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...

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.