如何在转发器的寻呼机控制中突出显示所选页面?
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>