Copied to clipboard

Flag this post as spam?

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


  • Alpesh 13 posts 103 karma points
    Dec 24, 2015 @ 08:45
    Alpesh
    0

    Using TypedContent in asp.net, Umbraco

    I am trying to use below code :

    var node = Umbraco.TypedContent(AnyIdToPass);

    but it's giving me below error

    The type or namespace name 'TypedContent' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)

    What I have missed in reference?

  • Tommy Enger 72 posts 277 karma points c-trib
    Dec 24, 2015 @ 08:54
    Tommy Enger
    101

    Is this in a cshtml file or a custom class? If custom class, you have to do something like:

    var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
    

    More info here: https://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/ see: "How to reference UmbracoHelper"

  • Alpesh 13 posts 103 karma points
    Dec 24, 2015 @ 08:59
    Alpesh
    0

    I am using asp.net User Controls, C#

  • 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