views:

1058

answers:

1

I have been using the excellent IPagedList from Martijn Boland paging method for MVC1 for some time now to good effect. I have just attempted to use it with Haacked's Default Templated Views in MVC2 and have found that it causes problems.

Specifically, when calling:

<%= Html.Display("SomeViewDataKeyToAnIPagedListCollection") %>

from inside of a Shared Index view, causes the pager object to be rendered instead of the appropriate DisplayTemplate View for the PagedList collection. I assume that this is because the mechanism for matching DisplayTemplates with the Model is falling over.

Anyone come across a workaround for this already?

A: 

This is similar to this question (with no real solution):

http://stackoverflow.com/questions/1536462/mvc2-net-paging

Here is someone who has implemented paging in MVC2, but without IPageList:

http://stackoverflow.com/questions/1322826/subsonic-3-0-0-3-mvc2-how-to-work-paging-model-haspreviouspage-not-working

Shiraz Bhaiji