How can I create, for example, the data-bind attribute on declaration and the Html.TextboxFor helper?
The execution is simple:
@Html.TextBoxFor(model => model.SomeProperty, new { data-bind="something" })
is not legal due to a problem with names with a dash "-". Is there a way around this problem or is it just not possible to pass html attributes with names containing dashes?
NOTE. I tried to tickle @ (this helps if you want to pass an attribute that matches C # to reserved words like "class") before the attribute, but that didn't help ...
Marko source share