问题
Is it possible to put a reference to JQuery (or any other javascript file) in my webconfig, so that then I won't have to keep referencing in every page I create that uses it?
I can imagine if I ever upgrade the version etc. - it will be a bit of a hassle having to rename all these files.
回答1:
You can use a Master Page for this.
回答2:
i am sure that their is no good way or best practice to do that in web.config
their is a little and good way to follow
put the reference in master page [if you use ASPX viewengine]
put the reference in layout page [if you use razor viewengine]
putting the javascript from cdn is also better
来源:https://stackoverflow.com/questions/5137856/reference-jquery-assembly-in-web-config