G
Guest
I'm interested in paging a ASP.NET datalist. The ASP.NET datalist control
does not natively support paging.
I am binding an XmlDataSource (which is populated by entries in the
filesystem) to the my datalist control. The output is several hundred images
in a tabular view. I would like to limit the number of images to perhaps 50
per page.
There are various articles on the web that describe how to custom-implement
paging with datalist controls, but they tend to use SQLDataSource as a
starting point. SqlDataSource supports methods that as near as I can tell,
XmlDataSource does not. I probably need to find another way.
I was wondering if I could simply implement "fake" paging either using
ASP.NET's ability to manipulate visiblity server-side on rows, or perhaps a
similar tactic that involved AJAX. The number of records I'm dealing with is
not huge and keeping the entire collection of records in memory should not
be problematic.
If I take a non-AJAX approach, I need to know the C# syntax of how I could,
say, designate rows X through XX on the datalist as visible, and all other
rows invisible. I also need to know at what point in the page lifecycle this
manipulation needs to happen.
does not natively support paging.
I am binding an XmlDataSource (which is populated by entries in the
filesystem) to the my datalist control. The output is several hundred images
in a tabular view. I would like to limit the number of images to perhaps 50
per page.
There are various articles on the web that describe how to custom-implement
paging with datalist controls, but they tend to use SQLDataSource as a
starting point. SqlDataSource supports methods that as near as I can tell,
XmlDataSource does not. I probably need to find another way.
I was wondering if I could simply implement "fake" paging either using
ASP.NET's ability to manipulate visiblity server-side on rows, or perhaps a
similar tactic that involved AJAX. The number of records I'm dealing with is
not huge and keeping the entire collection of records in memory should not
be problematic.
If I take a non-AJAX approach, I need to know the C# syntax of how I could,
say, designate rows X through XX on the datalist as visible, and all other
rows invisible. I also need to know at what point in the page lifecycle this
manipulation needs to happen.