Thanks all!
@REZA ZAREIAN FARD
Yesterday, I was use your way, but It's not worked. However, today I just re-tried and the application can run without error. But, the page still refresh.
Here is updated code:
.ascx file:
<asp:UpdatePanel ID="upReportsList" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Repeater ID="rptReportsList" runat="server">
<ItemTemplate>
<tr>
<td class="auto-style2"> </td>
<td class="auto-style3">
<a href='/Create-Report/Detail-Report.aspx?ReportId=<%# Eval("ItemID") %>'>
<%# Eval("ItemID") %>
</a>
</td>
<td>
<a href='/Create-Report/Detail-Report.aspx?ReportId=<%# Eval("ItemID") %>'>
<%# Eval("ItemReportName") %>
</a>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
<asp:Label ID="lblPageCount" runat="server" Style="font-weight: 700"></asp:Label>
<asp:Button ID="btnPrev" runat="server" Text="Previous" OnClick="btnPrev_Click" />
<asp:Button ID="btnNext" runat="server" Text="Next" OnClick="btnNext_Click" />
</ContentTemplate>
</asp:UpdatePanel>
Code behind for buttons action:
protected void btnNext_Click(object sender, EventArgs e)
{
//send to next page
Response.Redirect(string.Format("{0}{1}", "~/Reports-List.aspx?Page=", Convert.ToString(_pageNum + 1)));
}
protected void btnPrev_Click(object sender, EventArgs e)
{
//send to previous page
Response.Redirect(string.Format("{0}{1}", "~/Reports-List.aspx?Page=", Convert.ToString(_pageNum - 1)));
}
Please let me know where do I need to change?