Reputation: 47
I am using ASP.Net with jquery/javascript. Common wisdom seems to dictate that the javascript for a page be in a separate file, I was wondering if anyone has suggestions for best practise as regards to where these js files should be placed in the website directory structure, as you may end up having a considerable amount of JS for each page, obviously library routines would be in a dedicated js directory. Does anyone have any suggestions? These are possibilities I was considering:
Or
Upvotes: 1
Views: 300
Reputation: 17482
What we do in our team is that we have duplicate directory structures for our .Net files and our .js files. It has served us pretty well and that way your Javascript code and .Net code is grouped together and is easy to find.
So I would vote for your first example as a "Best Practice"
Upvotes: 1