Why not have the Scripts folder inside of the Content folder for ASP.NET MVC project?

后端 未结 2 1327
春和景丽
春和景丽 2021-01-12 01:40

Out curiosity I was wondering if there was a logical reason to have the Scripts folder not a sub folder of the Contents folder in an ASP.NET MVC project. The Contents folder

相关标签:
2条回答
  • 2021-01-12 02:11

    Possibly because scripts could be denoted as providing more functionality than style and design items, so it could be considered a portion of your business logic.

    0 讨论(0)
  • 2021-01-12 02:15

    The scripts and content folders are containers for client-side consumed files. They don't affect your MVC applications in any way. You can rename and move them around as you see fit, provided you update the URL references to them to point to the new path.

    Having said that, I personally tend to rename these to js and css mostly because this makes my URLs shorter and easier to read and understand.

    0 讨论(0)
提交回复
热议问题