Paging demo upgraded to ASP.NET MVC Beta

The post about paging in ASP.NET MVC still gets many hits, but the demo was created with ASP.NET MVC preview 5, so therefore I upgraded the demo to ASP.NET MVC Beta. I also removed a little bug that occurred when paging an already filtered list.

You can download the updated demo here.

6 Comments

  • zapper
    January 22, 2009 - 6:23 pm | Permalink

    How can I open this in MS Visual Studio 2008 Express? The lib folder cannot be accessed. The reference to MvcPaging.dll is missing too. Could you please post an Express version of the demo? Thanks for these posts by the way!

  • martijn
    January 23, 2009 - 1:07 pm | Permalink

    Unfortunately, I don’t have VS 2008 Express installed, so no luck I’m afraid.
    Tried to install VWD Express but it seems to nicely integrate into my VS 2008 Pro environment so I can’t get a clean VS 2008 Express environment.

  • martijn
    January 23, 2009 - 1:10 pm | Permalink

    Unfortunately I don’t have a proper VS 2008 Express environment, so I can’t create a solution.

    But it isn’t too hard to copy the source into a VS 2008 Express solution is it?

  • Brian
    January 30, 2009 - 7:00 pm | Permalink

    This doesn’t seem to run in VS2008 with ASP.NET MVC RC1.

  • martijn
    January 31, 2009 - 12:17 pm | Permalink

    From RC, viewContext doesn’t inherit from RequestContext anymore. in the Pager.cs GeneratePageLink method, you have to change the line

    var virtualPathData = RouteTable.Routes.GetVirtualPath(this.viewContext, pageLinkValueDictionary);

    to:

    var virtualPathData = RouteTable.Routes.GetVirtualPath(this.viewContext.RequestContext, pageLinkValueDictionary);

  • Brian
    February 3, 2009 - 11:25 pm | Permalink

    martijn: Thanks, it works now. Not sure why but I also had to point my references to the RC assemblies to get that new line of code to work.

  • Comments are closed.