views:

149

answers:

1

Hello

I have a datapager with next and previous buttons as so:

   <asp:DataPager ID="dpFeaturedPager" PagedControlID="lvFeaturedTips" QueryStringField="ftpg" PageSize="1" runat="server">
        <Fields>            
            <asp:nextpreviouspagerfield ButtonCssClass="featured-previous" PreviousPageText="Previous" ShowNextPageButton="false" />
            <asp:nextpreviouspagerfield ButtonCssClass="featured-next" NextPageText="Next" ShowPreviousPageButton="false" />
        </Fields>
    </asp:DataPager>   

When there is only one page available, the Next and Previous links are rendered as so:

<a disabled="disabled">Previous</a>

I have not seen this disabled tag before, and presume it's coming from the datapager control which I won't be able to control.

As usual, this is fine on FireFox but on IE7 the Previous and Next text does not render correctly - it is outlined (what I would expect disabled to look like to be honest - but looks a bit ugly in the page!)

Can I control this in CSS, or is this a known issue?

Thanks Duncan

A: 

Check out this thread on StackOverflow, they have some suggestions on CSS styling for disabled links and controls. Hope it helps!

a[disabled=disabled] { 
  color: red; 
  font-weight: bold;
  border: 0px;
} 

Edit: Doesn't look like the selector attribute will work in IE6.

Tommy
I tried a[disabled=disabled] { color: red; font-weight: bold;} but sadly no joy - didn't work!
Duncan
Have you tried setting this in your nextpreviouspagerfield tag - RenderDisabledButtonsAsLabels=”true"? This will ensure not to render them as html links but just labels.
Tommy
Problem with this is that I'm using the QueryStringField property also - and apparently you can't use both together! I can see having to do something like this - http://gsej.wordpress.com/2009/05/31/using-a-datapager-with-both-a-querystringfield-and-renderdisabledbuttonsaslabels/
Duncan