Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-03
5
Medium Priority
?
240 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 1000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2
Suggested Courses

824 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