Solved

How do I change the label text in the footer of a repeater control?

Posted on 2008-10-03
5
235 Views
Last Modified: 2012-05-05
I have a label control in the footer of a repeater that lists a number of items. The repeater has items, quantities prices and extended prices. In the ItemDataBound event, I am putting the total price of the items in a label in the footer. I have a link button that resets all quantities to zero. I loop through the repeater items and update the quantities and extended prices, but I cant get to the total price label in the footer to set the text to zero.

I have tries Page.FindControl, Controls(0).FindControl, etc, but no luck.
0
Comment
Question by:BigCan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 21

Accepted Solution

by:
silemone earned 250 total points
ID: 22635243
try something like this...

Dim FooterItem As RepeaterItem = rptr.Controls(rptr.Controls.Count - 1)    'where rptr is the rptr
0
 
LVL 21

Expert Comment

by:silemone
ID: 22635248
lol...where rptr is the repeater
0
 

Author Comment

by:BigCan
ID: 22635389
Yep&that was it.

I added:
lbLabel = FooterItem.FindControl("lblTotalPrice")
If Not lbLabel Is Nothing Then
lbLabel.Text = "$0.00"
End If
0
 

Author Closing Comment

by:BigCan
ID: 31502810
Thanks!
0
 
LVL 21

Expert Comment

by:silemone
ID: 22635434
good job...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question