Ok, let's assume (lol) I'm a newbie at ASP and I don't know anything about ASP development. Now that you're done laughing, can you help me answer a couple of questions? ![]()
- If I have <asp:ScriptManager runat="server">inside the form tag, and it has a reference like, <asp:ScriptReference Name="jquery"/>, do I have still have to add all the scripts to the head tag, like, <script src="~/Assets/js/jquery.min.js"></script>?
- Depending on the answer to #1, this question may be moot, but here it is anyway. Can I add a script like this, <script src="~/Assets/js/jquery.chili-2.2.js"></script>, to a ScriptManager like this, <asp:ScriptReference Name="jquery.chili-2.2.js" Assembly="System.Web" Path="~/Assets/js/jquery.chili-2.2.js"/>
I look at my pages and I see call after call to JQuery and other javascript files in my "Assets" folder. Then I look at the ScriptManager and see a single call to jquery, I just wonder if I'm overkilling my page with unnecessary calls.
Here's an example: (like the yellow in the head could be "inherited" by the yellow in the ScriptManager)
<head runat="server"><!-- Base meta --><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=0.80"><meta http-equiv="refresh" content="300"><!-- Descriptive meta --><title>Blah</title><meta name="title" content=""><meta name="description" content=""><meta name="keywords" content=""><meta name="author" content=""><!-- CSS assets --><link href="~/Assets/bootstrap/bootstrap.min.css" rel="stylesheet"><link href="~/Assets/css/font-awesome.css" rel="stylesheet"><!-- JS assets --><link href="~/Assets/css/jquery-ui.css" rel="stylesheet"><link href="~/Assets/css/jquery.signature.css" rel="stylesheet"><script src="~/Assets/js/jquery.min.js"></script><script src="~/Assets/bootstrap/bootstrap.min.js"></script><script src="~/Assets/js/bootstrap-hover-dropdown.min.js"></script><script src="~/Assets/js/jquery.smooth-scroll.min.js"></script><script src="~/Assets/js/jquery.vide.min.js"></script><script src="~/Assets/js/jquery.bgswitcher.js"></script><!--[if lt IE 9]><script src="~/Assets/js/html5shiv.min.js"></script><script src="~/Assets/js/respond.min.js"></script><![endif]--><!-- Theme specific assets --><link href="~/Assets/css/app.css" rel="stylesheet"><!-- Global portal stying --><link href="~/Assets/css/banners.css" rel="stylesheet"><!-- Page banners --><script src="~/Assets/js/app.js"></script><!--[if IE]><script src="~/Assets/js/excanvas.js"></script><![endif]--><script type="text/javascript" src="~/Assets/js/jquery.ui.touch-punch.min.js"></script><script src="~/Assets/js/modernizr-2.6.2.min.js"></script><script src="~/Assets/js/jquery.min.js"></script><script src="~/Assets/js/jquery-ui.min.js"></script><script src="~/Assets/js/jquery.metadata.js"></script><script src="~/Assets/js/jquery.bookmark.js"></script><script src="~/Assets/js/jquery.signature.js"></script><script src="~/Assets/js/jquery.chili-2.2.js"></script></head><body><form runat="server"><asp:ScriptManager runat="server"><Scripts><%--To learn more about bundling scripts in ScriptManager see https://go.microsoft.com/fwlink/?LinkID=301884 --%><%--Framework Scripts--%><asp:ScriptReference Name="MsAjaxBundle"/><asp:ScriptReference Name="jquery"/><asp:ScriptReference Name="jquery.ui.combined" /><asp:ScriptReference Name="bootstrap"/><asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js"/><asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js"/><asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js"/><asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js"/><asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js"/><asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js"/><asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js"/><asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js"/> Playing aroung here -> <asp:ScriptReference Name="jquery.chili-2.2.js" Assembly="System.Web" Path="~/Assets/js/jquery.chili-2.2.js"/><asp:ScriptReference Name="WebFormsBundle"/><%--Site Scripts--%></Scripts></asp:ScriptManager>