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.

ContactAreaRegistration.cs 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. using System.Web.Optimization;
  4. namespace Teknik.Areas.Contact
  5. {
  6. public class ContactAreaRegistration : AreaRegistration
  7. {
  8. public override string AreaName
  9. {
  10. get
  11. {
  12. return "Contact";
  13. }
  14. }
  15. public override void RegisterArea(AreaRegistrationContext context)
  16. {
  17. context.MapSubdomainRoute(
  18. "Contact.Index", // Route name
  19. new List<string>() { "dev", "contact" }, // Subdomains
  20. "", // URL with parameters
  21. new { controller = "Contact", action = "Index" }, // Parameter defaults
  22. new[] { typeof(Controllers.ContactController).Namespace }
  23. );
  24. context.MapSubdomainRoute(
  25. "Contact.Action", // Route name
  26. new List<string>() { "dev", "contact" }, // Subdomains
  27. "{action}", // URL with parameters
  28. new { controller = "Contact", action = "Index" }, // Parameter defaults
  29. new[] { typeof(Controllers.ContactController).Namespace }
  30. );
  31. // Register Bundles
  32. BundleTable.Bundles.Add(new ScriptBundle("~/bundles/contact").Include(
  33. "~/Areas/Contact/Scripts/Contact.js"));
  34. }
  35. }
  36. }