I am trying to create a link that simply runs a javascript function with the parameters set by my mvc model. I have something like this
<a onclick="$(' foo_@Model.bar ').toggle()"></a>
However, this literally makes the onclick element ' foo@Model.bar ' instead of printing the contents of Model.bar. How do I avoid HTML without modifying it?
source share