Created
January 31, 2012 16:55
-
-
Save timgthomas/1711566 to your computer and use it in GitHub Desktop.
DoddleReport with MVC Areas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using DoddleReport.Web; | |
namespace Product.Web.Areas.Admin | |
{ | |
public class AdminAreaRegistration : AreaRegistration | |
{ | |
public override string AreaName | |
{ | |
get { return "Admin"; } | |
} | |
public override void RegisterArea(AreaRegistrationContext context) | |
{ | |
// Any idea why this doesn't work... | |
context.MapReportingRoute(); | |
// ...but this, effectively identical call, does? | |
context.MapRoute("Admin_DoddleReport", "Admin/{controller}/{action}.{extension}/{*pathInfo}", null, new { extension = new ReportRouteConstraint() }); | |
// (This is the default route for this area.) | |
context.MapRoute("Admin_default", "Admin/{controller}/{action}/{id}", new { action = "Index", controller = "Home", id = UrlParameter.Optional }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment