G
Guest
Hello,
I am trying to use an If Then statement inside of a repeater control.
However, I am getting the following error:
Expression expected.
Any help would be appreciated.
Thanks in advance,
sck10
<asp:Repeater id="rptWebDocList" runat="server">
<HeaderTemplate>
<table border="1">
</HeaderTemplate>
<ItemTemplate>
<%# If Container.DataItem("Status") = " Total Not Reworked" Then %>
<tr><td width="280" colspan="3"><hr color=#0000FF></td></tr>
<tr>
<td width="120"><%# Container.DataItem("Status") %></div></td>
<td width="80"><%# Container.DataItem("StatusCount") %></div></td>
<td width="80"><%# Container.DataItem("PercentTotal") %>%</div></td>
</tr>
<% Else %>
<tr>
<td width="120"><%# Container.DataItem("Status") %></div></td>
<td width="80"><%# Container.DataItem("StatusCount") %></div></td>
<td width="80"><%# Container.DataItem("PercentTotal") %>%</div></td>
</tr>
<% End If %>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater></div></td>
I am trying to use an If Then statement inside of a repeater control.
However, I am getting the following error:
Expression expected.
Any help would be appreciated.
Thanks in advance,
sck10
<asp:Repeater id="rptWebDocList" runat="server">
<HeaderTemplate>
<table border="1">
</HeaderTemplate>
<ItemTemplate>
<%# If Container.DataItem("Status") = " Total Not Reworked" Then %>
<tr><td width="280" colspan="3"><hr color=#0000FF></td></tr>
<tr>
<td width="120"><%# Container.DataItem("Status") %></div></td>
<td width="80"><%# Container.DataItem("StatusCount") %></div></td>
<td width="80"><%# Container.DataItem("PercentTotal") %>%</div></td>
</tr>
<% Else %>
<tr>
<td width="120"><%# Container.DataItem("Status") %></div></td>
<td width="80"><%# Container.DataItem("StatusCount") %></div></td>
<td width="80"><%# Container.DataItem("PercentTotal") %>%</div></td>
</tr>
<% End If %>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater></div></td>