I am trying to pass an integer parameter to Url.Action based on hasClass output of jquery. something like below but is invalid syntax.
<li class="myClass">
<a href="@Url.Action("SetActionMode", "Home", new { enable = $(this).find('i').hasClass("fa-check") ? 0 : 1 })">
<i class="fa fa-check"></i> Debug Mode
</a>
</li>
What is the correct syntax for above or is there some easy way to do this?