Copied to clipboard

Flag this post as spam?

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


  • Bob 6 posts 56 karma points
    Feb 12, 2014 @ 03:16
    Bob
    0

    Setting Property Values using Razor

    Hi All,

    I have been using umbraco for a while but new to Razor. I have managed to write some simple razor scripts to get and check property values but am wondering how you can set a node property or attribute values in razor.

    Cheers,

     

     

     

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Feb 12, 2014 @ 08:28
    Jeavon Leopold
    1

    Hi Bob,

    Welcome to Our!

    It is the job of the content service to write values. While it will work in Razor it is generally the job of a controller to perform such operations.

    There are tutorials on both controllers and the content service at Umbraco.tv that I would recommend.

    http://umbraco.tv/videos/developer/fundamentals/surface-controllers/introduction/ and http://umbraco.tv/videos/developer/fundamentals/content-api/introduction/

    Jeavon

  • 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