Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find label in a datalist footer?

Status
Not open for further replies.

song2siren

Programmer
Jun 4, 2003
103
GB
Hello

I've got a datalist with a couple of labels in the footer. However, my code-behind cannot find the controls to populate and I get the message 'Object reference not set to an instance of an object'.

I use the following in my page load to add a value to the label:

lblTotal.Text = String.Format("{0:c}", orderTotal + 4)

However, this doesn't work, although putting the label outside of the datalist does work. Any suggestions would be much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top