Continuing my ASP.NET GridView Tips and Tricks series, this post shows how to highlight the current page in an ASP.NET GridView Pager.
There are some cool CSS tips that you can apply on the ASP.NET GridView pager to improve the look and feel of GridView paging. Here’s how the GridView paging appears with no css applied
Now add the following CSS in the <head> element on your page
Now set the GridView <PagerStyle> to this CSS class, which will modify the style of the pager
That’s it. Now browse your GridView and the paging should look much better than it did earlier. As seen below, the current page gets highlighted and there is extra spacing between the page numbers.