How do I get rid of this error? Repeater 1 is not declared?
Here's the code for the repeater, I have a label present to write no data available
<asp:Label ID="NoDataTxt" runat="server" Style="z-index: 100; left: 421px; position: absolute;
top: 198px"
Font-Bold="True" ForeColor="Red"></asp:Label>
<br />
<center> <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<center><table width="90%" background="images/beige102.gif"> - At this table tag I have an error that says text is not allowed between the opening and closing tags for element table)
<tr>
<td colspan="2" align="left"><b><font color="Black">Claim SSN:</font> <font color="#330099"><%# Eval("ClaimSSN") %></font></b>
</td>
<td colspan="2" align="left"><b><font color="Black">PIC:</font><font color="#330099"><%# Eval("PIC") %></font></b>
</td>
<td colspan="2" align="left"><b><font color="Black">PIC SSN:</font> <font color="#330099"><%# Eval("PayeeSSN") %></font></b>
</td>
<td colspan="2" align="left"><b><font color="Black">PMT Type:</font><font color="#330099"><%#Eval("PMTTYPE")%></font></b>
</td>
</tr>
<td colspan="2">
</td>
<td colspan="2" align="left"><b><font color="Black">PMT Amount: </font><font color="#330099"><%# Eval("PMTAMT", "{0:c2}")%></font></b>
</td>
<td colspan="2" align="left"><b><font color="Black">PMT Date: </font><font color="#330099"><%# Eval("PMTDate", "{0:d}")%></font></b>
</td>
<td colspan="2" align="left"><b><font color="Black">Status Code: </font><font color="#330099"><%# Eval("StatusCode")%></font></b>
</td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2" align="left"><b><font color="Black">Pin: </font><font color="#330099"><%#getPin(DataBinder.Eval(Container.DataItem, "Pin"))%></font></b>
</td>
</tr><tr>
<td colspan="100%"><hr size="1" color=#330099 /></td>
</tr>
</table></center>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Here's the page_Load
If Repeater1.Items.Count = 0 Then
NoDataTxt.Text =
"No Data available"
End If
Protected
Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater1.ItemDataBound
NoDataTxt.Visible = "false"
End Sub
If I comment the references to the repeater1 out it works but I need to tell the user no data is available how do I do this?
Thanks