W
Wayne Wengert
I am trying to use a repeater control on a .NEW Web Form. I modelled my code
after the example in the on-line help (see code below) but VSNET complains
that: "Within a server element, the element 'table' is missing its closing
tag or overlaps with element 'HeaderTemplate'."
What is the correct way to accomplish this?
=============== Code ===============
<asp:Repeater id="Repeater1" runat="server">
<HeaderTemplate>
<table width="100%" style="font: 8pt verdana">
<tr style="background-colorFA894">
<th>
WGI Event
</th>
<th>
Start Date
</th>
<th>
Units<br />Registered
</th>
<th>Closed?</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%# DataBinder.Eval(Container, "DataItem.RegionalID") %>
</td>
<td><%# DataBinder.Eval(Container,"DataItem.StartDate") %>
</td>
<td><%# DataBinder.Eval(Container,"DataItem.UnitCount") %>
</td>
<td><%# DataBinder.Eval(Container,"DataItem.CGClosed") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container, "DataItem.RegionalID") %>
</td>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container,"DataItem.StartDate") %>
</td>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container,"DataItem.UnitCount") %>
</td>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container,"DataItem.CGClosed") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
after the example in the on-line help (see code below) but VSNET complains
that: "Within a server element, the element 'table' is missing its closing
tag or overlaps with element 'HeaderTemplate'."
What is the correct way to accomplish this?
=============== Code ===============
<asp:Repeater id="Repeater1" runat="server">
<HeaderTemplate>
<table width="100%" style="font: 8pt verdana">
<tr style="background-colorFA894">
<th>
WGI Event
</th>
<th>
Start Date
</th>
<th>
Units<br />Registered
</th>
<th>Closed?</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%# DataBinder.Eval(Container, "DataItem.RegionalID") %>
</td>
<td><%# DataBinder.Eval(Container,"DataItem.StartDate") %>
</td>
<td><%# DataBinder.Eval(Container,"DataItem.UnitCount") %>
</td>
<td><%# DataBinder.Eval(Container,"DataItem.CGClosed") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container, "DataItem.RegionalID") %>
</td>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container,"DataItem.StartDate") %>
</td>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container,"DataItem.UnitCount") %>
</td>
<td bgcolor="lightblue">
<%# DataBinder.Eval(Container,"DataItem.CGClosed") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>