The next generation of the Teknik Services. Written in ASP.NET. Fork for blog tags.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HomeAreaRegistration.cs 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System.Web.Mvc;
  2. using Teknik;
  3. namespace Teknik.Areas.Home
  4. {
  5. public class HomeAreaRegistration : AreaRegistration
  6. {
  7. public override string AreaName
  8. {
  9. get
  10. {
  11. return "Home";
  12. }
  13. }
  14. public override void RegisterArea(AreaRegistrationContext context)
  15. {
  16. context.MapSubdomainRoute(
  17. "Home_dev", // Route name
  18. "dev",
  19. "Home/{controller}/{action}", // URL with parameters
  20. new { area = "Home", controller = "Home", action = "Index" } // Parameter defaults
  21. );
  22. context.MapSubdomainRoute(
  23. "Home_subdomain", // Route name
  24. "www",
  25. "{controller}/{action}", // URL with parameters
  26. new { area = this.AreaName, controller = "Home", action = "Index" } // Parameter defaults
  27. );
  28. context.MapSubdomainRoute(
  29. "Home_default", // Route name
  30. null,
  31. "{controller}/{action}", // URL with parameters
  32. new { area = this.AreaName, controller = "Home", action = "Index" } // Parameter defaults
  33. );
  34. //context.MapRoute(
  35. // "Home_default",
  36. // "{controller}/{action}",
  37. // new { area = "Home", controller = "Home", action = "Index" },
  38. // namespaces: new[] { "Teknik.Areas.Home.Controllers" }
  39. //);
  40. }
  41. }
  42. }