Click here to Skip to main content
16,018,394 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
iam using custom pagination in my gridview and uses Repeater control for showing page indexes..the code is
XML
<asp:Repeater ID="rptPager"  runat="server" >
<ItemTemplate>
    <asp:LinkButton ID="lnkPage" runat="server" Text='<%#Eval("Text") %>' CommandArgument='<%# Eval("Value") %>'
      Enabled='<%# Eval("Enabled") %>' OnClick="Page_Changed" >
    </asp:LinkButton>
</ItemTemplate>
</asp:Repeater>


the page index is like 1 2 3 4 5 etc

here what i want is when i click on one link it should be highlighted...

code of Page_Changed event
C#
protected void Page_Changed(object sender, EventArgs e)
        {
            pageIndex = int.Parse((sender as LinkButton).CommandArgument);
            //here i got the corresponding value
            //if i click on 1 it should be 1
            //if i click on 2 it should be 2
        }
Posted

1 solution

follow the below link.

http://stackoverflow.com/questions/19417699/highlighting-page-number-using-repeater
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900