J
Jason Sirota
I created a custom "page numbers" control, which displays page numbers on my listing page. My problem is that at the end of the page numbers I set a LinkButton for "Next Page" with a " : " inbetween the final page number and the link button arrow. I then enclose that LinkButton in a Label to turn it on and off based on whether the page the user is viewing is the last page (i.e. if the current page = last page, don't show) Here is the HTML
<asp:Label Runat="server" ID="lbl_nextpage" Visible="<%# Not(int_currentpage = int_totalpages) %>" > : 
<asp:LinkButton Runat="server" ID="NextPage"><img src="<%# str_imageroot %>/arrow.gif" width="4" height="8" border="0" alt="next page"></asp:LinkButton></asp:Label
My problem is this. When I start on Page 1, the Label appears as it should, if I then jump to the last page, the Label disappears as it should. However, if I go back to another page, the Label reappears (i.e. it inserts a span tag) but the span tag is empty, neither the Link Button nor the is inside the <span> tags.
I checked all my databindings, all the controls are visible at render time, yet the <span> tags are empty. I have used this method hundreds of times with no problem, the controls switch on and off. In fact, the code is exactly the same in the "previous page" section and that link button turns on and off without a problem
I am stumped
Jaso
<asp:Label Runat="server" ID="lbl_nextpage" Visible="<%# Not(int_currentpage = int_totalpages) %>" > : 
<asp:LinkButton Runat="server" ID="NextPage"><img src="<%# str_imageroot %>/arrow.gif" width="4" height="8" border="0" alt="next page"></asp:LinkButton></asp:Label
My problem is this. When I start on Page 1, the Label appears as it should, if I then jump to the last page, the Label disappears as it should. However, if I go back to another page, the Label reappears (i.e. it inserts a span tag) but the span tag is empty, neither the Link Button nor the is inside the <span> tags.
I checked all my databindings, all the controls are visible at render time, yet the <span> tags are empty. I have used this method hundreds of times with no problem, the controls switch on and off. In fact, the code is exactly the same in the "previous page" section and that link button turns on and off without a problem
I am stumped
Jaso