I'm using jQuery plugins in an ASP.Net MVC site.
I've often to include CSS and JS files as required by the plugins I use in every page. So I want to centralize all those dependencies in a single place in my app. thus if a dependency for a given plug-in is changed or updated, I'll only have to modify a single place in my app.
I've thought in two possible solutions:
Extend the
HTMLHelperwith a partial method likeGetPlugin("jqgrid");that will print out all the script and style tags needed.Create a partial view for each pluginlike
jqGridDependencies.ascxthat will contain the script and style tags needed.
Do you have any other idea? what do you think of both proposals?