song2siren
Programmer
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.
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.