Archive for February 2009

At first glance, upgrading to the RC1 was quite a debacle. First of all, any link that I created using the much more performant Html.RouteLink (instead of Html.ActionLink) just stopped working. It turns out there was a regression bug in the RC that caused this. The ASP.NET MVC team quickly released a refresh which fixed the problem.

The next problem came when I noticed Stephen Walther’s paging helper stopped working. It would throw a null reference exception whenever I used the Html.Pager() helper method. The issue was a breaking change in the RC1 with the location the RequestContext.

To fix the issue, you can download the solution from Stephen’s site. Open up the solution and change all the references to the latest ASP.NET MVC assemblies. When you compile the main project, you’ll find an error in the PagerBuilder.cs class at line 165. All you have to do is update this line to:

var urlHelper = new UrlHelper(_helper.ViewContext.RequestContext);

Compile the project and replace the assembly in your ASP.NET MVC project. I’m sure Stephen will update the project eventually so you could just download the latest version.

Hope this helps!