Copied to clipboard

Flag this post as spam?

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


  • glob 72 posts 172 karma points
    Jul 21, 2016 @ 13:50
    glob
    0

    How to refresh partialview macro on buttonclick?

    Hello,

    I am using umbraco 7+ and i want to refresh / call partialview razor macro on button click using javascript with parameter.

    Is there any way to do the same?

    Awaiting your reply.

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Jul 25, 2016 @ 21:30
    Alex Skrypnyk
    0

    Hi Glob,

    You can create ApiController or Surface controller, where you will handle request from javascript.

    In the controller you need to render yor partial view an return it to js.

    Maybe this will be handy for you if you want to return partial view as string:

    http://stackoverflow.com/questions/15588488/asp-net-mvc-render-partial-view-to-a-string-to-return-with-json

    Thanks,

    Alex

  • 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