Copied to clipboard

Flag this post as spam?

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


  • Dmitrij Jazel 86 posts 179 karma points
    Aug 11, 2013 @ 17:36
    Dmitrij Jazel
    0

    Button onClick in Razor?

    Hi guys,

    I have some C# code I want to be executed in the onClick event.

    What would be the best way to do it? Any suggestions? :)

     

    Regards,

    Dmitrij

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 12, 2013 @ 12:35
    Jeroen Breuer
    100

    In Razor you don't have an onclick event. Instead you could create a form and post that form. For example something like this: http://our.umbraco.org/forum/developers/razor/22536-Send-email-in-razor-macro

    If you're using MVC you can post  to a controller of course.

    Jeroen

  • Dmitrij Jazel 86 posts 179 karma points
    Aug 12, 2013 @ 19:44
    Dmitrij Jazel
    0

    Hej Jeroen,

    Thanks for quick response :)

    Ehh... well I was hoping for some magic that just might do this... well but still that is better than nothing :)

    Thanks for info! :-)))

    Dmitrij

Please Sign in or register to post replies

Write your reply to:

Draft