Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repeater error - server tag is not well formed

I'm using a repeater to display data records on my page. It used to be that I'd use tables inside it and I never had a problem, but now I'm using divs and I keep getting build errors saying the server tag is not well formed...

Can anyone see anything wrong with this?

<asp:Repeater runat="server" ID="rptGuestbook" 
    onitemdatabound="rptGuestbook_ItemDataBound">
    <ItemTemplate>
        <div runat="server" id="divPost" class="post">
            <div runat="server" id="divAuthor" class="author">
                <ul>
                    <li><asp:HyperLink runat="server" ID="lnkEmail" ImageUrl="~/Images/emailicon.png" NavigateUrl="mailto: <%# Eval("emailaddress") %>"></asp:HyperLink></li>
                    <li><asp:HyperLink runat="server" ID="lnkWeb" ImageUrl="~/Images/webicon.png" NavigateUrl="<%# Eval("webaddress") %>"></asp:HyperLink></li>
                    <li>Posted By: <%# Eval("author") %></li>
                </ul>               
                <div runat="server" id="divAdmin" class="delete-button" visible="false">
                    <asp:Button runat="server" ID="btnDeletePost" Text="Delete Post" OnClick="btnDeletePost_Click" />
                </div>
            </div>
            <div runat="server" id="divMessage" class="post-message"><%# Eval("message") %></div>
        </div>
    </ItemTemplate>
</asp:Repeater>
like image 948
Ortund Avatar asked Dec 01 '22 20:12

Ortund


1 Answers

Try using single quotes...

<li><asp:HyperLink runat="server" 
     ID="lnkEmail" 
     ImageUrl="~/Images/emailicon.png" 
     NavigateUrl='mailto: <%# Eval("emailaddress") %>'></asp:HyperLink></li>

<li><asp:HyperLink runat="server" 
     ID="lnkWeb" 
     ImageUrl="~/Images/webicon.png" 
     NavigateUrl='<%# Eval("webaddress") %>'></asp:HyperLink></li>
like image 154
Christian Phillips Avatar answered Dec 11 '22 04:12

Christian Phillips