Copied to clipboard

Flag this post as spam?

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


  • khansaa111 25 posts 55 karma points
    May 29, 2015 @ 11:51
    khansaa111
    0

    a field that contains html code

    hi everyone

    I filled a field which call Slogan,  in a given that contains html codeby exmple : Strong </ br> Safe </ br> Stable. by a data that contains html code

    for exmple : Strong </ br> Safe </ br> Stable.

    then I want the code will be converted , not displayed as a data,

    i need your help

    thank you

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 29, 2015 @ 12:00
    Dennis Aaen
    0

    Hi khansaa111,

    Then you need to use the method called @Html.Raw() and the pass your field in to that. Then your break tags and strong tags would be rendered on the fronted of you website and not be encoded.

    If you have access to Umbraco TV, there is a video about @Html.Raw http://umbraco.tv/videos/implementor/working-with-umbraco-data/razor-syntax/htmlraw/ and there is also some written documentation about this. http://umbraco.tv/videos/implementor/working-with-umbraco-data/razor-syntax/htmlraw/documentation

    Hope this helps,

    /Dennis

  • khansaa111 25 posts 55 karma points
    May 29, 2015 @ 12:49
    khansaa111
    0

    hi dennis Aaen ,

    thank you soooooo mush ,  its work now with this method :)

  • 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