Copied to clipboard

Flag this post as spam?

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


  • Paul Fowles 75 posts 184 karma points
    Jun 18, 2013 @ 13:52
    Paul Fowles
    0

    javascript references for use in backend

    How do you add javascript references to a backend umbraco aspx page like editContent.aspx? 

    I would like to add json2.js douglas crockfords library so ublogsy can work in ie7

    I found a similar question here but no one answered it

    Thanks

    Paul

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 8x c-trib
    Jul 04, 2013 @ 11:31
    Lars-Erik Aabech
    0
    public class SomeControl : UserControl // or IDataEditor that has a control etc.
    {
        // ...
        protected override void OnInit(object s, EventArgs e)
        {
            //...
            Page.ClientScript.RegisterClientScriptInclude(
                typeof(SomeControl),
                "Unique key for your script to prevent double reference",
                Page.ResolveUrl("~/path to your script")
            );
            //...
        }
        // ...
    }
    

    Basic ASP.NET ;)

Please Sign in or register to post replies

Write your reply to:

Draft