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>
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With