Solved

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

Posted on 2008-10-03
5
197 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
  • 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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 tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now