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.

BlogAreaRegistration.cs 1.3KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Web.Mvc;
  2. using System.Web.Optimization;
  3. namespace Teknik.Areas.Blog
  4. {
  5. public class BlogAreaRegistration : AreaRegistration
  6. {
  7. public override string AreaName
  8. {
  9. get
  10. {
  11. return "Blog";
  12. }
  13. }
  14. public override void RegisterArea(AreaRegistrationContext context)
  15. {
  16. context.MapSubdomainRoute(
  17. "Blog_dev", // Route name
  18. "dev",
  19. "Blog/{controller}/{action}/{username}/{id}", // URL with parameters
  20. new { controller = "Blog", action = "Index", username = UrlParameter.Optional, id = UrlParameter.Optional } // Parameter defaults
  21. );
  22. context.MapSubdomainRoute(
  23. "Blog_default", // Route name
  24. "blog",
  25. "{controller}/{action}/{username}/{id}", // URL with parameters
  26. new { controller = "Blog", action = "Index", username = UrlParameter.Optional, id = UrlParameter.Optional } // Parameter defaults
  27. );
  28. // Register Bundles
  29. BundleTable.Bundles.Add(new ScriptBundle("~/bundles/blog").Include(
  30. "~/Areas/Blog/Scripts/Blog.js"));
  31. }
  32. }
  33. }