A
André Freitas
Im building a manualy paging. And I got a problem that im trying to solve
for a long time.
I do have:
int pageCount;
int pageIndex;
And:
<asp:LinkButton ID="lnk1" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk2" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk3" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk4" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk5" runat="server" OnClick="LinkButton_OnClick" />
I do need a logic to do something like that:
Suposing
int pageCount = 6;
int pageIndex = 1 (default);
First load ([] means disabled):
[1] 2 3 4 5
User clicks 2:
1 [2] 3 4 5
User clicks 3:
1 2 [3] 4 5
User clicks 4:
2 3 [4] 5 6
User clicks 6 (last page):
2 3 4 5 [6]
User clicks 5:
2 3 4 [5] 6
Suposing
int pageCount = 3;
int pageIndex = 1 (default);
First load ([] means disabled):
[1] 2 3
User clicks 2:
1 [2] 3
User clicks 3:
1 2 [3]
I ll be glad if someone can help me. Regards.
for a long time.
I do have:
int pageCount;
int pageIndex;
And:
<asp:LinkButton ID="lnk1" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk2" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk3" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk4" runat="server" OnClick="LinkButton_OnClick" />
<asp:LinkButton ID="lnk5" runat="server" OnClick="LinkButton_OnClick" />
I do need a logic to do something like that:
Suposing
int pageCount = 6;
int pageIndex = 1 (default);
First load ([] means disabled):
[1] 2 3 4 5
User clicks 2:
1 [2] 3 4 5
User clicks 3:
1 2 [3] 4 5
User clicks 4:
2 3 [4] 5 6
User clicks 6 (last page):
2 3 4 5 [6]
User clicks 5:
2 3 4 [5] 6
Suposing
int pageCount = 3;
int pageIndex = 1 (default);
First load ([] means disabled):
[1] 2 3
User clicks 2:
1 [2] 3
User clicks 3:
1 2 [3]
I ll be glad if someone can help me. Regards.