How can I bind a VueJS event to a C# razor input?

Viewed 4542

I have a few dropdowns created with razor html helpers:

 @Html.DropDownList("formtype-filter", Model.FormTypes, "Any Type...",
 new { @class = "form-control" })

I want to add a 'change' event handler to this input using VueJS

Normally I would try to add something along the lines of v-on:change="foo()"

However when I try to add this to my razor input, I receive errors because the razor template doesn't support colons as far as I'm aware

@Html.DropDownList("formtype-filter", Model.FormTypes, "Any Type...",
     new { @class = "form-control", @v_on:change="foo()" })
                                       //^- Not allowed

How can I bind a Vue.js action/event to this input? Is it possible?

1 Answers
Related