Copied to clipboard

Flag this post as spam?

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


  • Christoffer Frede 16 posts 126 karma points
    May 03, 2017 @ 11:29
    Christoffer Frede
    0

    nuPicker using reference

    Hey all. i have just installed the nuPicker package from the backoffice in an 7.5.6 umbraco installation.

    i have created a sql dropdown picker, which works and gets and shows data in the dropdown from the database.

    now i would like to get the data in a template. I have tried looking up some examples on how to do this and many of them have a reference to nuPicker like this @using nuPicker when i try to add that reference i get this error: The type or namespace name 'nuPicker' could not be found (are you missing a using directive or an assembly reference?)

    anyone why i cant reference nuPicker ?

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    May 03, 2017 @ 12:33
    Dan Diplo
    101

    I think it should be @using nuPickers (plural)

    Easiest way to make this available to all views is to edit the web.config file in your /Views/ folder (not your main one) and then add in:

    <namespaces>
            ......
            <add namespace="nuPickers"/>
    </namespaces>
    

    (Just add the above into namespaces and leave whatever is already there). This globally registers the namespace for all views.

  • Christoffer Frede 16 posts 126 karma points
    May 03, 2017 @ 13:24
    Christoffer Frede
    0

    thank you man!

    @using nuPickers did it for me. now its working and i can get the Picker object. i did not add the namespace to the /views/web.config, but maybe ill have to add it at a later time if the reference is not working in all views. anyway, thumbs up.

Please Sign in or register to post replies

Write your reply to:

Draft