How to style a formview pager

1.9k Views Asked by At

Hi I'm using a formview with the built in pager. I'd like to add space in between the individual page number link. Do this though a property? Could it be done with CSS styles?

1

There are 1 best solutions below

0
On BEST ANSWER

Well the FormView only displays a single item - it's not like a ListView or GridView that displays lists of data that can be paged. But, to answer your question, this should get you going toward formatting the page links (to space them out more) in the built-in pager control:

<asp:DataPager runat="server">
    <Fields>
        <asp:NumericPagerField NumericButtonCssClass="numericButtonCSS" />
    </Fields>
</asp:DataPager>

And then in your head section

<style type="text/css">
    .numericButtonCSS 
    {
        margin-left: 5px;
        margin-right: 5px;
    }
</style>