开发者

Using an asp:DataPager control, how do I set the CSS class of the numeric overflow button?

I'm using the asp:DataPager control, and I have [first], [prev], [1], [2], [3], [4], [5], [6], [...], [next], [last] buttons. I can set a css class for a开发者_StackOverflow中文版ll of these apart from the [...] button. I can't find a property that will let me do this.

How can I set the CSS class for [...]?

My code so far is:

<asp:DataPager ID="dpNav" runat="server">                
    <Fields>

    <asp:NextPreviousPagerField 
        ButtonType="Button"      
        ShowFirstPageButton="true" FirstPageText="<<"
        ShowPreviousPageButton="true" PreviousPageText="<"
        ShowNextPageButton="false"
        ShowLastPageButton="false"
        ButtonCssClass="nav" />                       

    <asp:NumericPagerField
        ButtonType="Button"
        ButtonCount="6"      
        CurrentPageLabelCssClass="nav-current" 
        NumericButtonCssClass="nav"                      
        RenderNonBreakingSpacesBetweenControls="true" />                    

    <asp:NextPreviousPagerField 
        ButtonType="Button"
        ShowFirstPageButton="false"
        ShowPreviousPageButton="false"
        ShowNextPageButton="true" NextPageText=">"
        ShowLastPageButton="true" LastPageText=">>"
        ButtonCssClass="nav" />        

    </Fields>    
</asp:DataPager>


Since there is no specific class for it, I suggest you to use html tags inside the button text such as

PreviousPageText='<span class="currentNm">[...]</span>'

in <asp:NumericPagerField />

Hope this idea will help you

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜