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.

No Trackbacks

6 Comments

  1. zapper

    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!

    Posted January 22, 2009 at 6:23 pm | Permalink
  2. martijn

    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.

    Posted January 23, 2009 at 1:07 pm | Permalink
  3. martijn

    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?

    Posted January 23, 2009 at 1:10 pm | Permalink
  4. Brian

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

    Posted January 30, 2009 at 7:00 pm | Permalink
  5. martijn

    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);

    Posted January 31, 2009 at 12:17 pm | Permalink
  6. Brian

    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.

    Posted February 3, 2009 at 11:25 pm | Permalink