Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# leecook 5/2/2007 9:11 AM
Afternoon,

Was using the NavigationLevelTwo control in a site and I went to to add a blank Header Template into the repeater, but it complains about "Object reference not set to an instance of an object." Why on earth would that be?

Any help appreciated.

Cheers,

Lee
# martijnb 5/2/2007 4:17 PM
Probably there is an ItemDataBound eventhandler that goes looking for a control that doesn't exist in the headertemplate of the repeater.
Add a check if the RepeaterItem is either an Item or AlternatingItem:
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)