This project is read-only.
I've updated my ASP.NET 3.5 + System.Web.Routing sample based on some great feedback and questions. It's much simpler and gives a better example of how routes can be configured. It now uses Phil Haack's excellent WebFormRouteHandler class, which is much more versatile than my unnecessarily generic one :)

The sample pages derive from a custom 'RoutablePage' class, but that's not mandatory. For simple routing, you can just derive from Page as usual.

If you'd like to use RequestContext's GetVirtualPath method (to automatically build URLs based on defined routes) your page can implement IRoutablePage (or derive from RoutablePage which includes some useful helper methods).

Last edited Oct 18, 2008 at 11:17 PM by BobStrogg, version 3