如何在转发器的寻呼机控制中突出显示所选页面? [英] How to highlight selected page in pager control for repeater ?

查看:67
本文介绍了如何在转发器的寻呼机控制中突出显示所选页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,



我使用寻呼机控制为我的转发器控件实现分页功能..



现在问题是我想用一些颜色突出显示所选页码。



我试图使用Jquery但是控件ID不可访问..



有分页按钮的链接按钮..



但是在Dom上它给出了ID为contenplaceholder1_repeater_btnPage_0等等。 ..所以我也无法使用jquery为这个按钮附加css ..



请建议我诀窍

Hii ,

I used pager control for implenting paging functionality for my repeater control ..

Now the probmel is that i want to highlight selected page number with some color .

I tried to use Jquery but that control id is not accessable ..

there is link button for paging button ..

but on Dom it gives ID as contenplaceholder1_repeater_btnPage_0 and so on ... so i am unable to attach css for that button using jquery also ..

please suggest me the trick

推荐答案

参考 - 在ASP.Net中实现中继器控制中的分页 [ ^ ]

Refer - Implement Paging in Repeater control in ASP.Net[^]
引用:

寻呼机的转发器

下面是用于填充寻呼机的Repeater控件,因为内联代码的语法在C#和VB.Net中是不同的,我给出了它们各自的HTML标记。 HTML标记有一些C#和VB.Net代码来交换当前页面和其余页面的CSS样式类,以便查看当前页面与其他页面的区别。



C#

Repeater for pager
Below is the Repeater control for populating the Pager, since the syntax of the inline code is different in C# and VB.Net, I given their respective HTML Markups. The HTML Markup has some C# and VB.Net code to swap the CSS style classes for the Current Page and the remaining pages so that the Current Page is viewed distinguished from others.

C#

<asp:Repeater ID="rptPager" runat="server">
    <ItemTemplate>
        <asp:LinkButton ID="lnkPage" runat="server" Text='<%#Eval("Text") %>' CommandArgument='<%# Eval("Value") %>'
            CssClass='<%# Convert.ToBoolean(Eval("Enabled")) ? "page_enabled" : "page_disabled" %>'
            OnClick="Page_Changed" OnClientClick='<%# !Convert.ToBoolean(Eval("Enabled")) ? "return false;" : "" %>'></asp:LinkButton>
   </ItemTemplate>
</asp:Repeater>


这篇关于如何在转发器的寻呼机控制中突出显示所选页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆