I had a similar problem when I wanted to pass the controller action URL (provided by the instance UrlHelperin the Razor view) for my viewmodel functions, which will be used later in jQuery AJAX calls.
, Visual Studio :
<button data-bind="click: function (data) { someFunction(data, '@Url.Action("SomeAction", "SomeController")') }">Action!</button>
, :
<button data-bind="@("click: function (data) { someFunction(data, '" + Url.Action("SomeAction", "SomeController") + "') }")">Action!</button>