I'm trying to write loads of UI partial views as stand alone components that can be used over and over again. My problem is that I will then need to have jquery references in all the files. My question is how to handle when a template page which comprises of multiple partial views in one then has multiple references to the same file, see my example below.
Partial view A:
- jquerylib.js
- functionsForPanelA.js
Partial view B:
- jquerylib.js
- functionsForPanelB.js
MVC razor page that uses both views:
Template page:
@html.renderpartial(Partial view A)
@html.renderpartial(Partial view B)
This would then reference jquerylib.js twice..
Thanks, James