views:

513

answers:

1

If I have the folling data pager

<asp:DataPager ID="DataPager1" runat="server" PagedControlID="lstBlogPosts"
    PageSize="1" onprerender="DataPager1_PreRender" >                       
    <Fields>
        <asp:NextPreviousPagerField ButtonType="Image"
            NextPageImageUrl="~/_Content/images/blog/btn-next.jpg"
            PreviousPageImageUrl="~/_Content/images/blog/btn-previous.jpg" />
    </Fields>
</asp:DataPager>

How can I go about styling the Next/Previous buttons with CSS (Essentially one has to be floated left and one floated right)

Thanks

+1  A: 

Your DataPager will look like this:

    <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lstBlogPosts" PageSize="1" onprerender="DataPager1_PreRender">
                <Fields>
                      <asp:NextPreviousPagerField ButtonType="Image" PreviousPageImageUrl="~/_Content/images/blog/btn-previous.jpg" ButtonCssClass="prew-item"  ShowNextPageButton="false"/>
                      <asp:NextPreviousPagerField ButtonType="Image" NextPageImageUrl="~/_Content/images/blog/btn-next.jpg" ButtonCssClass="next-item" ShowPreviousPageButton="false" />
                </Fields>
            </asp:DataPager>

So you have to declare the next and previous button in your markup.

Clarence Klopfstein
Working on an edit.. realized I messed this up.
Clarence Klopfstein
Edited to add the correct code.
Clarence Klopfstein