Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
Datalist Paging - Page links/navigation
kiki
Jan 30 2008 2:44 PM
9.4k
Reply
Hi,
I am working on a website and I have to reperesent the contents of a List<> in several pages. I use a PagedDataSource item and a DataList control for that. What I want to do is to create a links menu that will be created dynamicaly, it should look lke this
1 2 3 4 ... x Next
The List does not contain the same number of elements every time, and of course the number of pages is not stable. I have some code to make you understand better:
<asp:DataList id="DataList1" runat="server">
<ItemTemplate>
<%# Container.DataItem %>
</ItemTemplate>
</asp:DataList>
List<string> list1 = new List<string>;
System.Web.UI.WebControls.PagedDataSource pgds = new System.Web.UI.WebControls.PagedDataSource ();
pgds.DataSource = list1;
pgds.AllowPaging = true;
pgds.PageSize = 10;
DataList1.DataSource = pgds;
Can you help me and tell me what shoul I do to create this navigation-links bar;
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
print three lists <> using foreach
Creating a .NET Search Engine using C#, anyone can help?