I have a datalist that I want to repeat items and use the auto(row alternating) color for an application I am working on. I am trying to add a header template above the item template like so.
<table>
<asp:DataList ID="DataList1" runat="server" CellPadding="4" DataKeyField="num" DataSourceID="SqlDataSource1" ForeColor="#333333" OnItemDataBound="DataList1_ItemDataBound">
        <AlternatingItemStyle BackColor="White" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <ItemStyle BackColor="#EFF3FB" />
        <HeaderTemplate>
        <tr>
            <th>Item Name</th>
            <th>Item Type</th>
            <th>Item Price</th>
            <th>End(s) In</th>
        </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
            <td><a class="rolls2" href="ItemView.aspx?ItemName=<%# Eval("ItemName") %>&num=<%# Eval("num") %>"><%# Eval("ItemName") %></a></td>
            <td><%# Eval("ItemType")%></td>
            <td>$ <%# Eval("ItemPrice")%></td>
            <td><asp:Label ID="lblExp" Text='<%# Bind("CreateDate") %>' runat="server" /></td>
            </tr>
        </ItemTemplate>
        <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    </asp:DataList>
<table>
When I run this code I get a object not set to reference of the object and it points to lblExp.
If I remove the header the project runs sucessfully. Is there another way to simply add a Header to my table?
 
    