Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 653
  • Last Modified:

ScriptManager vs js files declared in the <head> tag

I have some .js files that I declare in the <head> tag in my master page for use throughout the website.

But...

In the <body> of my master page I also have this:


<atlas:ScriptManager id="ScriptManager1" runat="server" EnablePartialRendering="True"
AsyncPostBackErrorMessage="An error has occurred">
<Scripts>
<%--<atlas:ScriptReference Path="~/Scripts/always-include-common.js" />
<atlas:ScriptReference Path="~/Scripts/always-include-moz.js" />
<atlas:ScriptReference Path="~/Scripts/always-include-ie.js" />
<atlas:ScriptReference Path="~/Scripts/browser-all.js" />
<atlas:ScriptReference Path="../../Scripts/jquery-1.5.1.min.js" />
<atlas:ScriptReference Path="~/Scripts/thickbox.js" />
<atlas:ScriptReference Path="~/Scripts/jquery.cycle.all.js?v2.23'" />
<atlas:ScriptReference Path="~/Scripts/jquery.hoverIntent.js" />
<atlas:ScriptReference Path="~/Scripts/header.js" />--%>
</Scripts>
</atlas:ScriptManager>


I did not put this there, and I am not sure really what this is about.


What is the purpose of the ScriptManger...and what do the Script References do that the JS files declared in the <head> tag do not do????

Which one am I supposed to be using?


Incidentally, I was having some trouble with a jQuery plugin and I finally commented out the <ScriptReference> tags in  the Script Manager and the problem went away.!!
0
Tom Knowlton
Asked:
Tom Knowlton
1 Solution
 
raterusCommented:
Wow, haven't seen <atlas: tags in awhile!  Those were used before asp.net ajax came out, so you are dealing with a very old/buggy library let me assure you.  If you are already including these scripts in the <head> there is no reason to repeat them, in fact they will likely cause issues being in there twice.  I'd remove anything <atlas if you can get away with it, and don't think it's needed.
0
 
Tom KnowltonWeb developerAuthor Commented:
Agreed.

Last time I tried it was a disaster.

This time it seemed to work nicely.  I backed-up beforehadn...   :)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now