Results 1 to 3 of 3

Thread: javascript and other style sheets

  1. #1
    Join Date
    Sep 2005
    Posts
    48

    Default javascript and other style sheets

    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

  2. #2
    Join Date
    Aug 2011
    Location
    New delhi
    Posts
    7

    Default Reply from www.connectinfosoft.com

    You need to put all the reference on template.master page.

  3. #3
    Join Date
    May 2012
    Posts
    13

    Default

    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:

    Code:
    <head id="Head1" runat="server">
    <asp:ContentPlaceHolder ID="HeaderContent" runat="server"></asp:ContentPlaceHolder>
    </head>
    Then, on the page that needs access to the file(s):

    Code:
    <asp:Content ID="Header" runat="server" ContentPlaceHolderID="HeaderContent">
        <script src="jscripts/example.js" type="text/javascript"></script>
    </asp:Content>
    This will prevent files from being loaded on pages that do not use them.
    Last edited by bradg; 07-13-2012 at 09:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •