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.

CustomRazorViewEngine.cs 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Web.Mvc;
  7. namespace Teknik
  8. {
  9. public class CustomRazorViewEngine : RazorViewEngine
  10. {
  11. public CustomRazorViewEngine()
  12. {
  13. base.AreaViewLocationFormats = new string[]
  14. {
  15. "~/Areas/{2}/Views/{1}/{0}.cshtml",
  16. "~/Areas/{2}/Views/Shared/{0}.cshtml"
  17. };
  18. base.AreaMasterLocationFormats = new string[]
  19. {
  20. "~/Areas/{2}/Views/{1}/{0}.cshtml",
  21. "~/Areas/{2}/Views/Shared/{0}.cshtml"
  22. };
  23. base.AreaPartialViewLocationFormats = new string[]
  24. {
  25. "~/Areas/{2}/Views/{1}/{0}.cshtml",
  26. "~/Areas/{2}/Views/Shared/{0}.cshtml"
  27. };
  28. base.ViewLocationFormats = new string[]
  29. {
  30. "~/Views/{1}/{0}.cshtml",
  31. "~/Views/Shared/{0}.cshtml"
  32. };
  33. base.PartialViewLocationFormats = new string[]
  34. {
  35. "~/Views/{1}/{0}.cshtml",
  36. "~/Views/Shared/{0}.cshtml"
  37. };
  38. base.MasterLocationFormats = new string[]
  39. {
  40. "~/Views/{1}/{0}.cshtml",
  41. "~/Views/Shared/{0}.cshtml"
  42. };
  43. }
  44. }
  45. }