Search code examples
asp.netdatapager

Format DataPager Links


Actually all I want is to add #lastTab at the end of the links rendered by DataPager control in Asp.NET.

Since I like the NumericalField such as "1 2 3..." I don't want to mess up with the default implementation.

Can somebody help me?

Thanks.


Solution

  • Well,

    I didn't want to resort to jQuery and javascript but they were the last chance.

    Here is the code :

        $("#ctl00_HomeMasterContentPlaceHolder_printReviews_printReviewPager a").each(function (index, value) {
            if ($(this).attr("href") != "undefined")
                $(this).attr("href", $(this).attr("href") + "#last");
        });
    

    They solved everything eventually.

    Thanks.