Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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