Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vishnu VG 2 posts 22 karma points
    Mar 04, 2014 @ 14:58
    Vishnu VG
    0

    ClientDependancy - Javascript Placeholder Null Reference

    While using ClientDependancy in Umbraco, I am getting an error like below in Elmah. It is related to Client Depdency. This error is coming only on a single page Umbraco/Plugins/ExamineInspector/default.aspx. Anyone have any idea?

    System.NullReferenceException: Could not find the placeholder control to render the JavaScript:JavaScriptPlaceHolder

     

     

     


  • Mihai Savu 11 posts 75 karma points
    Nov 06, 2014 @ 23:17
    Mihai Savu
    0

    In /config/ClientDependancy.config look for a line like this one:

    <add name="PlaceHolderProvider" type="ClientDependency.Core.FileRegistration.Providers.PlaceHolderProvider, ClientDependency.Core" javascriptPlaceHolderId="JavaScriptPlaceHolder" cssPlaceHolderId="CssPlaceHolder" />

    Note the JavaScriptPlaceHolder and CssPlaceHolder values. Your ASPX or your Master page must have these placeholders having the IDs with exactly the same values. You may add them somewhere between <head></head> or anywhere you need the bundled javascript and css. This is how you define the placeholders:

    <asp:PlaceHolder runat="server" ID="CssPlaceHolder"></asp:PlaceHolder>
    <asp:PlaceHolder runat="server" ID="JavaScriptPlaceHolder"></asp:PlaceHolder>

    More info about ClientDependency: https://github.com/Shandem/ClientDependency/wiki

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies