TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kiki
NA
24
0
Datalist Paging - Page links/navigation
Jan 30 2008 2:44 PM
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;
Reply
Answers (
0
)
print three lists <> using foreach
Creating a .NET Search Engine using C#, anyone can help?