Copied to clipboard

Flag this post as spam?

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

  • James 251 posts 1169 karma points
    Aug 21, 2015 @ 14:40

    String Builder - UmbracoApiController Ajax


    Does anyone have an alternative to string builder when creating the html mark-up in an UmbracoApiController to pass back to a view via an Ajax call?

    At the moment I'm passing back blog post previews which is 7-10 lines of mark-up. It seems like a clunky way of doing it building it in string builder.

    Thanks and kind regards,


  • Alex Skrypnyk 6112 posts 23606 karma points MVP 7x admin c-trib
    Aug 21, 2015 @ 14:44
    Alex Skrypnyk

    Hi James,

    You can use this approach for rendering view to string and then return it for ajax request.

    And maybe it will be better to fill html markup on client side ? Get data from server in json and fill html template with this data.

    Thanks, Alex

Please Sign in or register to post replies

Write your reply to: