I'm trying to implement paging in asp.net website like a google and i used repeater for display content on webpage the content are displaying but the paging repeater not working when i clicked on linked button they're not working and if i'm not using master page then everything works good but i add master page link button not worked
if someone has any relevant solution please help me i'm stucked now
thanks with or without help...
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Finalpation.aspx.cs" Inherits="Finalpation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<li><asp:LinkButton ID="lnkFirst" runat="server" OnClick="lnkFirst_Click"> << First</asp:LinkButton></li>
<li class="active"><asp:LinkButton ID="lnkPrevious" runat="server" OnClick="lnkPrevious_Click"> < Previous </asp:LinkButton> </li>
<li><asp:Repeater ID="repeaterpaging" runat="server" onitemcommand="repeaterpaging_ItemCommand" OnItemDataBound="repeaterpaging_ItemDataBound">
<ItemTemplate>
<asp:LinkButton ID="btnPage" CommandName="Page" CommandArgument='<%# Eval("PageIndex") %>' Text='<%# Eval("PageText") %> ' runat="server" Font-Bold="True">
</asp:LinkButton>
</ItemTemplate>
</asp:Repeater> </li>
<li></li>
<li><asp:LinkButton ID="lnkNext" runat="server" OnClick="lnkNext_Click">Next > </asp:LinkButton></li>
<li><asp:LinkButton ID="lnkLast" runat="server" OnClick="lnkLast_Click">Last >> </asp:LinkButton>
</li>
protected void lnkNext_Click(object sender, EventArgs e)
{
lnkNext.Attributes["style"] = "background-color:black;color:#fff";
lnkFirst.Attributes["style"] = "";
lnkPrevious.Attributes["style"] = "";
lnkLast.Attributes["style"] = "";
if (Pageno == totalPages)
{
Pageno = totalPages;
}
else
{
Pageno = Pageno + 1;
}
BindRepeater();
}
What I have tried:
(1) i used causes validation inside linked button
(2) and enableview state