Question

I have something like this..

On master Page

<head runat="server">
    <link href="../StyleSheets/Main_Master.css" rel="stylesheet" type="text/css" />
    <%--<script type="text/javascript" src="../../Scripts/jquery-1.8.3.js"></script>--%>
    <script src="../../Scripts/Mainmenu.js" type="text/javascript"></script>
    <link href="../../Misc/Plugins/OrbitSlider/orbit-1.2.3.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Misc/Plugins/OrbitSlider/jquery.orbit-1.2.3.min.js"></script>
</head>

Content Page

<asp:Content ContentPlaceHolderID="LeftBarHeadContent" runat="server">
    <script src="../../Scripts/jquery-1.8.3.js"></script>
    <link href="../StyleSheets/Home_Content.css" rel="stylesheet" type="text/css" />
    <link href="../StyleSheets/Content_Common.css" rel="stylesheet" />
    <script src="../../Scripts/Contents_Common.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.cycle.all.js" type="text/javascript"></script>
</asp:Content>

Now, this renders on the browser like

<head>
<script src="../../Scripts/jquery-1.8.3.js"></script>
        <link href="../StyleSheets/Home_Content.css" rel="stylesheet" type="text/css" />
        <link href="../StyleSheets/Content_Common.css" rel="stylesheet" />
        <script src="../../Scripts/Contents_Common.js" type="text/javascript"></script>
        <script src="../../Scripts/jquery.cycle.all.js" type="text/javascript"></script>
        <link href="../StyleSheets/Main_Master.css" rel="stylesheet" type="text/css" />
        <%--<script type="text/javascript" src="../../Scripts/jquery-1.8.3.js"></script>--%>
        <script src="../../Scripts/Mainmenu.js" type="text/javascript"></script>
        <link href="../../Misc/Plugins/OrbitSlider/orbit-1.2.3.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="../../Misc/Plugins/OrbitSlider/jquery.orbit-1.2.3.min.js"></script>
    </head>

Now, as you can see that content elements is rendered before the master content. I need the master content to load before as some of my plugins is throwing undifined jquery error if jquery is not included before the plugin appears.

Was it helpful?

Solution

Where is LeftBarHeadContent in your master page?

You need to place something like <asp:contentplaceholder id="LeftBarHeadContent" runat="server" /> in the <head> of the master page...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top