The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
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.6KB

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