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.9KB

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