Can anyone advise how to setup references to javascript files and additional stylesheets within ASPDNSF. I read that the reference to style.css is maintained internally, but what if your template uses js or another style sheet?
Thank you,
- Nick
Can anyone advise how to setup references to javascript files and additional stylesheets within ASPDNSF. I read that the reference to style.css is maintained internally, but what if your template uses js or another style sheet?
Thank you,
- Nick
Nick Coppola
Lead Developer
The Everest Information Technologies Group, LLC
Email Me
Development/Customization/Integration Experience:
VB.NET, C#.NET
MS SQL Server
InsiteCreation
AspDotNetStorefront
Interprise Suite
Tradepoint360
Custom Business Applications
You need to put all the reference on template.master page.
That may not be the best approach if you only need to access a script or style sheet across a few separate pages. If that's the case, add a ContentPlaceHolder to the head tag in the .master file:
Then, on the page that needs access to the file(s):Code:<head id="Head1" runat="server"> <asp:ContentPlaceHolder ID="HeaderContent" runat="server"></asp:ContentPlaceHolder> </head>
This will prevent files from being loaded on pages that do not use them.Code:<asp:Content ID="Header" runat="server" ContentPlaceHolderID="HeaderContent"> <script src="jscripts/example.js" type="text/javascript"></script> </asp:Content>
Last edited by bradg; 07-13-2012 at 09:41 AM.