I'm working on a project using C# razor engine and I wondering if it is possible to merge razor syntax with jQuery. Is that possible?
An approach I have done is something like this:
<script>
$(document).ready(function() {
@Html.Action("GoNext", "Actions", new { Id= ViewBag.Id, justifymessage = @:$("#msg").val(), Action = 3 })
});
</script>
a href="youAction">click me</a>and append that. I don't think you can use MVC from within jquery scripts, but I could be wrong@Html.Actionis server side.$("#msg").val()is client side.