• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

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

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
BigCan
Asked:
BigCan
  • 3
  • 2
1 Solution
 
silemoneCommented:
try something like this...

Dim FooterItem As RepeaterItem = rptr.Controls(rptr.Controls.Count - 1)    'where rptr is the rptr
0
 
silemoneCommented:
lol...where rptr is the repeater
0
 
BigCanAuthor Commented:
Yep&that was it.

I added:
lbLabel = FooterItem.FindControl("lblTotalPrice")
If Not lbLabel Is Nothing Then
lbLabel.Text = "$0.00"
End If
0
 
BigCanAuthor Commented:
Thanks!
0
 
silemoneCommented:
good job...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now