views:

10

answers:

0

This is a strange one. I have a couple of hyperlinks that I use for paginating a RadGrid (next page, prev page). All works well until I decided to hide one or the other when on the first/last page. So I added the Visible attribute and set a value of true/false using a databinding expression like so:

<asp:HyperLink Visible="<%#(int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") > 0 %>" ID="LinkPreviousPage" runat="server" OnClick="changePage('prev'); return false;" CommandName="Page" CommandArgument="Prev" Text="Previous Page" CssClass="prevPage" NavigateUrl="javascript:void(0);"/>

At this point I am finding this line as-is in the HTML source. As soon as I remove the Visible attribute it renders correctly as an a tag. I also tried a plain

<asp:HyperLink Visible="false" ID="LinkNextPage"...

but no avail.