Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. using System;
  2. using System.Web.Mvc;
  3. using System.Web.Routing;
  4. using Umbraco.Core;
  5. using Umbraco.Web;
  6.  
  7. namespace UmbracoTest
  8. {
  9. public class CustomUmbracoApplication : UmbracoApplication
  10. {
  11. protected override IBootManager GetBootManager()
  12. {
  13. return new CustomWebBootManager(this);
  14. }
  15. }
  16.  
  17.  
  18. public class CustomWebBootManager : WebBootManager
  19. {
  20. public CustomWebBootManager(UmbracoApplicationBase umbracoApplication) : base(umbracoApplication)
  21. {}
  22.  
  23. public override IBootManager Complete(Action<ApplicationContext> afterComplete)
  24. {
  25. RouteTable.Routes.MapRoute(
  26. "HomePage",
  27. "home/index",
  28. new {controller = "Home", action = "Test"}
  29. );
  30.  
  31.  
  32. return base.Complete(afterComplete);
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement